summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatarGravatar Aaron Giles <aaron@aarongiles.com>2014-02-19 06:07:32 +0000
committerGravatarGravatar Aaron Giles <aaron@aarongiles.com>2014-02-19 06:07:32 +0000
commit57cfaa163ee656de8f25e079eb721b3cb9720a9a (patch)
tree8b235effed1208b1c9b18d554f27154ce4df741d /src
parent5c2b6036df886a416ea727ecb72da2827b43bd93 (diff)
Switched rgb_t to a class, replacing macros with methods. Mappings are
as follows: MAKE_RGB(r,g,b) == rgb_t(r,g,b) MAKE_ARGB(a,r,g,b) == rgb_t(a,r,g,b) RGB_ALPHA(data) == data.a() RGB_RED(data) == data.r() RGB_GREEN(data) == data.g() RGB_BLUE(data) == data.b() RGB_BLACK == rgb_t::black RGB_WHITE == rgb_t::white Implicit conversions to/from UINT32 are built in as well as simple addition, subtraction, and scaling (with clamping). As a result of being a class, some stricter typing was needed in a few places but overall not too much.
Diffstat (limited to 'src')
-rw-r--r--src/emu/bus/a2bus/a2ultraterm.c8
-rw-r--r--src/emu/bus/iq151/minigraf.c2
-rw-r--r--src/emu/bus/iq151/ms151a.c2
-rw-r--r--src/emu/bus/nubus/nubus_48gc.c2
-rw-r--r--src/emu/bus/nubus/nubus_cb264.c2
-rw-r--r--src/emu/bus/nubus/nubus_m2hires.c6
-rw-r--r--src/emu/bus/nubus/nubus_m2video.c6
-rw-r--r--src/emu/bus/nubus/nubus_radiustpd.c4
-rw-r--r--src/emu/bus/nubus/nubus_spec8.c6
-rw-r--r--src/emu/bus/nubus/nubus_specpdq.c8
-rw-r--r--src/emu/bus/nubus/nubus_vikbw.c4
-rw-r--r--src/emu/bus/nubus/nubus_wsportrait.c2
-rw-r--r--src/emu/bus/nubus/pds30_30hr.c6
-rw-r--r--src/emu/bus/nubus/pds30_cb264.c6
-rw-r--r--src/emu/bus/nubus/pds30_mc30.c6
-rw-r--r--src/emu/bus/nubus/pds30_procolor816.c8
-rw-r--r--src/emu/bus/nubus/pds30_sigmalview.c4
-rw-r--r--src/emu/bus/wangpc/lvc.c2
-rw-r--r--src/emu/bus/wangpc/mvc.c6
-rw-r--r--src/emu/crsshair.c20
-rw-r--r--src/emu/debugint/debugint.c43
-rw-r--r--src/emu/drawgfx.c4
-rw-r--r--src/emu/drawgfxm.h4
-rw-r--r--src/emu/driver.c18
-rw-r--r--src/emu/drivers/empty.c2
-rw-r--r--src/emu/emupal.c30
-rw-r--r--src/emu/emupal.h2
-rw-r--r--src/emu/machine/laserdsc.c6
-rw-r--r--src/emu/machine/s3c24xx.c18
-rw-r--r--src/emu/render.c36
-rw-r--r--src/emu/rendersw.c6
-rw-r--r--src/emu/rendfont.c12
-rw-r--r--src/emu/rendlay.c84
-rw-r--r--src/emu/rendutil.c107
-rw-r--r--src/emu/save.h1
-rw-r--r--src/emu/screen.c8
-rw-r--r--src/emu/sound/cdp1864.c6
-rw-r--r--src/emu/sound/cdp1869.c2
-rw-r--r--src/emu/sound/mos6560.c38
-rw-r--r--src/emu/sound/mos7360.c78
-rw-r--r--src/emu/tilemap.c20
-rw-r--r--src/emu/tilemap.h10
-rw-r--r--src/emu/ui/devctrl.h8
-rw-r--r--src/emu/ui/menu.c8
-rw-r--r--src/emu/ui/ui.c2
-rw-r--r--src/emu/ui/ui.h42
-rw-r--r--src/emu/ui/viewgfx.c6
-rw-r--r--src/emu/video/315_5124.c6
-rw-r--r--src/emu/video/cdp1861.c2
-rw-r--r--src/emu/video/cdp1862.c2
-rw-r--r--src/emu/video/fixfreq.c4
-rw-r--r--src/emu/video/generic.c28
-rw-r--r--src/emu/video/i8275x.c2
-rw-r--r--src/emu/video/m50458.c2
-rw-r--r--src/emu/video/mb90082.c2
-rw-r--r--src/emu/video/mb_vcu.c4
-rw-r--r--src/emu/video/mc6845.c32
-rw-r--r--src/emu/video/mc6847.c72
-rw-r--r--src/emu/video/mc6847.h6
-rw-r--r--src/emu/video/psx.c2
-rw-r--r--src/emu/video/resnet.c2
-rw-r--r--src/emu/video/rgbgen.h38
-rw-r--r--src/emu/video/saa5050.c18
-rw-r--r--src/emu/video/stvvdp2.c146
-rw-r--r--src/emu/video/tlc34076.c4
-rw-r--r--src/emu/video/tlc34076.h2
-rw-r--r--src/emu/video/tms9928a.c34
-rw-r--r--src/emu/video/v9938.c2
-rw-r--r--src/emu/video/vector.c8
-rw-r--r--src/emu/video/vector.h6
-rw-r--r--src/emu/video/voodoo.c61
-rw-r--r--src/lib/util/aviio.c8
-rw-r--r--src/lib/util/bitmap.h4
-rw-r--r--src/lib/util/palette.c51
-rw-r--r--src/lib/util/palette.h268
-rw-r--r--src/lib/util/png.c34
-rw-r--r--src/lib/util/png.h4
-rw-r--r--src/mame/drivers/1942.c2
-rw-r--r--src/mame/drivers/4enraya.c2
-rw-r--r--src/mame/drivers/5clown.c2
-rw-r--r--src/mame/drivers/ace.c4
-rw-r--r--src/mame/drivers/acefruit.c32
-rw-r--r--src/mame/drivers/adp.c4
-rw-r--r--src/mame/drivers/alg.c2
-rw-r--r--src/mame/drivers/amaticmg.c2
-rw-r--r--src/mame/drivers/aristmk4.c4
-rw-r--r--src/mame/drivers/astinvad.c18
-rw-r--r--src/mame/drivers/astrof.c2
-rw-r--r--src/mame/drivers/atarifb.c24
-rw-r--r--src/mame/drivers/atarisy4.c2
-rw-r--r--src/mame/drivers/avalnche.c4
-rw-r--r--src/mame/drivers/avt.c4
-rw-r--r--src/mame/drivers/beaminv.c2
-rw-r--r--src/mame/drivers/berzerk.c12
-rw-r--r--src/mame/drivers/bfcobra.c6
-rw-r--r--src/mame/drivers/blitz.c2
-rw-r--r--src/mame/drivers/blockade.c4
-rw-r--r--src/mame/drivers/bnstars.c2
-rw-r--r--src/mame/drivers/boxer.c8
-rw-r--r--src/mame/drivers/bsktball.c8
-rw-r--r--src/mame/drivers/buster.c2
-rw-r--r--src/mame/drivers/canyon.c8
-rw-r--r--src/mame/drivers/cardline.c2
-rw-r--r--src/mame/drivers/carrera.c2
-rw-r--r--src/mame/drivers/caswin.c2
-rw-r--r--src/mame/drivers/cb2001.c4
-rw-r--r--src/mame/drivers/cball.c12
-rw-r--r--src/mame/drivers/cischeat.c42
-rw-r--r--src/mame/drivers/clayshoo.c2
-rw-r--r--src/mame/drivers/cntsteer.c2
-rw-r--r--src/mame/drivers/cobra.c12
-rw-r--r--src/mame/drivers/coinmvga.c4
-rw-r--r--src/mame/drivers/coolpool.c2
-rw-r--r--src/mame/drivers/coolridr.c2
-rw-r--r--src/mame/drivers/copsnrob.c4
-rw-r--r--src/mame/drivers/corona.c2
-rw-r--r--src/mame/drivers/cps3.c2
-rw-r--r--src/mame/drivers/cshooter.c2
-rw-r--r--src/mame/drivers/cubeqst.c2
-rw-r--r--src/mame/drivers/cyclemb.c2
-rw-r--r--src/mame/drivers/dacholer.c2
-rw-r--r--src/mame/drivers/dai3wksi.c2
-rw-r--r--src/mame/drivers/ddayjlc.c2
-rw-r--r--src/mame/drivers/deco156.c2
-rw-r--r--src/mame/drivers/destroyr.c16
-rw-r--r--src/mame/drivers/discoboy.c4
-rw-r--r--src/mame/drivers/djmain.c2
-rw-r--r--src/mame/drivers/dlair.c2
-rw-r--r--src/mame/drivers/dmndrby.c2
-rw-r--r--src/mame/drivers/dorachan.c4
-rw-r--r--src/mame/drivers/dotrikun.c4
-rw-r--r--src/mame/drivers/dragrace.c32
-rw-r--r--src/mame/drivers/drw80pkr.c2
-rw-r--r--src/mame/drivers/dwarfd.c10
-rw-r--r--src/mame/drivers/embargo.c2
-rw-r--r--src/mame/drivers/enigma2.c4
-rw-r--r--src/mame/drivers/eolith16.c2
-rw-r--r--src/mame/drivers/esh.c4
-rw-r--r--src/mame/drivers/ettrivia.c2
-rw-r--r--src/mame/drivers/fcrash.c2
-rw-r--r--src/mame/drivers/feversoc.c4
-rw-r--r--src/mame/drivers/fgoal.c4
-rw-r--r--src/mame/drivers/firefox.c2
-rw-r--r--src/mame/drivers/flyball.c8
-rw-r--r--src/mame/drivers/fortecar.c2
-rw-r--r--src/mame/drivers/fresh.c2
-rw-r--r--src/mame/drivers/gal3.c2
-rw-r--r--src/mame/drivers/galgame.c4
-rw-r--r--src/mame/drivers/gamecstl.c8
-rw-r--r--src/mame/drivers/gei.c4
-rw-r--r--src/mame/drivers/gluck2.c2
-rw-r--r--src/mame/drivers/goldnpkr.c6
-rw-r--r--src/mame/drivers/goldstar.c4
-rw-r--r--src/mame/drivers/gpworld.c2
-rw-r--r--src/mame/drivers/groundfx.c2
-rw-r--r--src/mame/drivers/gunpey.c2
-rw-r--r--src/mame/drivers/halleys.c14
-rw-r--r--src/mame/drivers/headonb.c4
-rw-r--r--src/mame/drivers/hideseek.c2
-rw-r--r--src/mame/drivers/highvdeo.c2
-rw-r--r--src/mame/drivers/hng64.c2
-rw-r--r--src/mame/drivers/hotstuff.c2
-rw-r--r--src/mame/drivers/istellar.c2
-rw-r--r--src/mame/drivers/itgambl2.c2
-rw-r--r--src/mame/drivers/itgambl3.c2
-rw-r--r--src/mame/drivers/jangou.c2
-rw-r--r--src/mame/drivers/jantotsu.c2
-rw-r--r--src/mame/drivers/jollyjgr.c2
-rw-r--r--src/mame/drivers/kingdrby.c4
-rw-r--r--src/mame/drivers/koikoi.c2
-rw-r--r--src/mame/drivers/kontest.c2
-rw-r--r--src/mame/drivers/lazercmd.c10
-rw-r--r--src/mame/drivers/lemmings.c2
-rw-r--r--src/mame/drivers/lgp.c2
-rw-r--r--src/mame/drivers/looping.c2
-rw-r--r--src/mame/drivers/m10.c4
-rw-r--r--src/mame/drivers/m14.c4
-rw-r--r--src/mame/drivers/m63.c4
-rw-r--r--src/mame/drivers/m79amb.c2
-rw-r--r--src/mame/drivers/macrossp.c4
-rw-r--r--src/mame/drivers/magicard.c2
-rw-r--r--src/mame/drivers/magicfly.c72
-rw-r--r--src/mame/drivers/majorpkr.c2
-rw-r--r--src/mame/drivers/marinedt.c2
-rw-r--r--src/mame/drivers/mazerbla.c4
-rw-r--r--src/mame/drivers/meadows.c4
-rw-r--r--src/mame/drivers/mediagx.c8
-rw-r--r--src/mame/drivers/meijinsn.c2
-rw-r--r--src/mame/drivers/merit.c2
-rw-r--r--src/mame/drivers/meyc8080.c2
-rw-r--r--src/mame/drivers/mgolf.c8
-rw-r--r--src/mame/drivers/miniboy7.c2
-rw-r--r--src/mame/drivers/minivadr.c2
-rw-r--r--src/mame/drivers/mirax.c2
-rw-r--r--src/mame/drivers/mogura.c2
-rw-r--r--src/mame/drivers/mpoker.c4
-rw-r--r--src/mame/drivers/mpu4dealem.c2
-rw-r--r--src/mame/drivers/mpu4vid.c2
-rw-r--r--src/mame/drivers/murogmbl.c2
-rw-r--r--src/mame/drivers/namcos23.c4
-rw-r--r--src/mame/drivers/neoprint.c2
-rw-r--r--src/mame/drivers/nightgal.c2
-rw-r--r--src/mame/drivers/norautp.c16
-rw-r--r--src/mame/drivers/nyny.c2
-rw-r--r--src/mame/drivers/olibochu.c2
-rw-r--r--src/mame/drivers/othello.c16
-rw-r--r--src/mame/drivers/panicr.c2
-rw-r--r--src/mame/drivers/pcxt.c2
-rw-r--r--src/mame/drivers/peplus.c4
-rw-r--r--src/mame/drivers/photon2.c32
-rw-r--r--src/mame/drivers/pinball2k.c8
-rw-r--r--src/mame/drivers/pipeline.c2
-rw-r--r--src/mame/drivers/plygonet.c2
-rw-r--r--src/mame/drivers/poker72.c2
-rw-r--r--src/mame/drivers/poolshrk.c8
-rw-r--r--src/mame/drivers/progolf.c2
-rw-r--r--src/mame/drivers/psikyo4.c8
-rw-r--r--src/mame/drivers/psikyosh.c2
-rw-r--r--src/mame/drivers/quizo.c2
-rw-r--r--src/mame/drivers/quizshow.c4
-rw-r--r--src/mame/drivers/r2dtank.c4
-rw-r--r--src/mame/drivers/rabbit.c2
-rw-r--r--src/mame/drivers/rotaryf.c4
-rw-r--r--src/mame/drivers/roul.c2
-rw-r--r--src/mame/drivers/safarir.c4
-rw-r--r--src/mame/drivers/sbowling.c2
-rw-r--r--src/mame/drivers/seabattl.c10
-rw-r--r--src/mame/drivers/segald.c2
-rw-r--r--src/mame/drivers/segas24.c4
-rw-r--r--src/mame/drivers/shanghai.c2
-rw-r--r--src/mame/drivers/shougi.c2
-rw-r--r--src/mame/drivers/skyarmy.c2
-rw-r--r--src/mame/drivers/skydiver.c6
-rw-r--r--src/mame/drivers/skylncr.c4
-rw-r--r--src/mame/drivers/skyraid.c40
-rw-r--r--src/mame/drivers/slapshot.c2
-rw-r--r--src/mame/drivers/slotcarn.c2
-rw-r--r--src/mame/drivers/smsmcorp.c2
-rw-r--r--src/mame/drivers/spaceg.c36
-rw-r--r--src/mame/drivers/spcforce.c2
-rw-r--r--src/mame/drivers/speglsht.c2
-rw-r--r--src/mame/drivers/spiders.c2
-rw-r--r--src/mame/drivers/srmp5.c2
-rw-r--r--src/mame/drivers/srmp6.c4
-rw-r--r--src/mame/drivers/sshot.c4
-rw-r--r--src/mame/drivers/ssingles.c2
-rw-r--r--src/mame/drivers/sspeedr.c2
-rw-r--r--src/mame/drivers/sstrangr.c6
-rw-r--r--src/mame/drivers/stuntair.c6
-rw-r--r--src/mame/drivers/sub.c4
-rw-r--r--src/mame/drivers/subs.c8
-rw-r--r--src/mame/drivers/subsino.c4
-rw-r--r--src/mame/drivers/supdrapo.c2
-rw-r--r--src/mame/drivers/superchs.c2
-rw-r--r--src/mame/drivers/supercrd.c2
-rw-r--r--src/mame/drivers/superdq.c6
-rw-r--r--src/mame/drivers/supertnk.c2
-rw-r--r--src/mame/drivers/superwng.c2
-rw-r--r--src/mame/drivers/taitowlf.c10
-rw-r--r--src/mame/drivers/tankbust.c2
-rw-r--r--src/mame/drivers/tapatune.c6
-rw-r--r--src/mame/drivers/tattack.c4
-rw-r--r--src/mame/drivers/taxidriv.c2
-rw-r--r--src/mame/drivers/tgtpanic.c4
-rw-r--r--src/mame/drivers/tmaster.c2
-rw-r--r--src/mame/drivers/tmmjprd.c2
-rw-r--r--src/mame/drivers/toratora.c2
-rw-r--r--src/mame/drivers/triplhnt.c16
-rw-r--r--src/mame/drivers/tugboat.c2
-rw-r--r--src/mame/drivers/ultrsprt.c4
-rw-r--r--src/mame/drivers/undrfire.c2
-rw-r--r--src/mame/drivers/vega.c4
-rw-r--r--src/mame/drivers/videopkr.c6
-rw-r--r--src/mame/drivers/vpoker.c2
-rw-r--r--src/mame/drivers/wallc.c2
-rw-r--r--src/mame/drivers/warpsped.c4
-rw-r--r--src/mame/drivers/wheelfir.c2
-rw-r--r--src/mame/drivers/wpc_dot.c4
-rw-r--r--src/mame/drivers/zac2650.c8
-rw-r--r--src/mame/includes/amiga.h4
-rw-r--r--src/mame/includes/psikyosh.h2
-rw-r--r--src/mame/includes/stv.h2
-rw-r--r--src/mame/machine/atarifb.c8
-rw-r--r--src/mame/machine/megadriv.c2
-rw-r--r--src/mame/machine/nitedrvr.c12
-rw-r--r--src/mame/machine/segamsys.c4
-rw-r--r--src/mame/machine/vectrex.c20
-rw-r--r--src/mame/video/1942.c2
-rw-r--r--src/mame/video/1943.c2
-rw-r--r--src/mame/video/20pacgal.c4
-rw-r--r--src/mame/video/40love.c2
-rw-r--r--src/mame/video/8080bw.c12
-rw-r--r--src/mame/video/aerofgt.c2
-rw-r--r--src/mame/video/alpha68k.c4
-rw-r--r--src/mame/video/ambush.c2
-rw-r--r--src/mame/video/amigaaga.c20
-rw-r--r--src/mame/video/ampoker2.c2
-rw-r--r--src/mame/video/appoooh.c4
-rw-r--r--src/mame/video/arabian.c2
-rw-r--r--src/mame/video/argus.c6
-rw-r--r--src/mame/video/astrocde.c4
-rw-r--r--src/mame/video/atarisy2.c2
-rw-r--r--src/mame/video/avgdvg.c8
-rw-r--r--src/mame/video/bagman.c2
-rw-r--r--src/mame/video/bankp.c2
-rw-r--r--src/mame/video/baraduke.c2
-rw-r--r--src/mame/video/battlane.c2
-rw-r--r--src/mame/video/beezer.c2
-rw-r--r--src/mame/video/bfm_adr2.c34
-rw-r--r--src/mame/video/bionicc.c2
-rw-r--r--src/mame/video/bking.c2
-rw-r--r--src/mame/video/bladestl.c2
-rw-r--r--src/mame/video/blockout.c2
-rw-r--r--src/mame/video/blueprnt.c2
-rw-r--r--src/mame/video/bogeyman.c2
-rw-r--r--src/mame/video/bosco.c4
-rw-r--r--src/mame/video/brkthru.c2
-rw-r--r--src/mame/video/btime.c4
-rw-r--r--src/mame/video/buggychl.c2
-rw-r--r--src/mame/video/bwing.c2
-rw-r--r--src/mame/video/calomega.c2
-rw-r--r--src/mame/video/capbowl.c2
-rw-r--r--src/mame/video/carjmbre.c2
-rw-r--r--src/mame/video/carpolo.c2
-rw-r--r--src/mame/video/cave.c2
-rw-r--r--src/mame/video/cbuster.c2
-rw-r--r--src/mame/video/ccastles.c2
-rw-r--r--src/mame/video/cclimber.c20
-rw-r--r--src/mame/video/centiped.c6
-rw-r--r--src/mame/video/chaknpop.c2
-rw-r--r--src/mame/video/champbas.c4
-rw-r--r--src/mame/video/cheekyms.c2
-rw-r--r--src/mame/video/cinemat.c10
-rw-r--r--src/mame/video/circusc.c2
-rw-r--r--src/mame/video/cloak.c2
-rw-r--r--src/mame/video/cloud9.c2
-rw-r--r--src/mame/video/clshroad.c2
-rw-r--r--src/mame/video/combatsc.c2
-rw-r--r--src/mame/video/compgolf.c2
-rw-r--r--src/mame/video/contra.c2
-rw-r--r--src/mame/video/cop01.c2
-rw-r--r--src/mame/video/cosmic.c10
-rw-r--r--src/mame/video/cps1.c4
-rw-r--r--src/mame/video/crbaloon.c2
-rw-r--r--src/mame/video/crgolf.c2
-rw-r--r--src/mame/video/cvs.c2
-rw-r--r--src/mame/video/darkmist.c4
-rw-r--r--src/mame/video/darkseal.c2
-rw-r--r--src/mame/video/dday.c2
-rw-r--r--src/mame/video/ddribble.c2
-rw-r--r--src/mame/video/dec0.c2
-rw-r--r--src/mame/video/dec8.c2
-rw-r--r--src/mame/video/deco32.c6
-rw-r--r--src/mame/video/decocass.c2
-rw-r--r--src/mame/video/decocomn.c4
-rw-r--r--src/mame/video/decodmd1.c12
-rw-r--r--src/mame/video/decodmd2.c2
-rw-r--r--src/mame/video/decodmd3.c4
-rw-r--r--src/mame/video/digdug.c2
-rw-r--r--src/mame/video/docastle.c4
-rw-r--r--src/mame/video/dogfgt.c2
-rw-r--r--src/mame/video/dribling.c2
-rw-r--r--src/mame/video/drmicro.c2
-rw-r--r--src/mame/video/epos.c2
-rw-r--r--src/mame/video/equites.c4
-rw-r--r--src/mame/video/espial.c2
-rw-r--r--src/mame/video/esripsys.c2
-rw-r--r--src/mame/video/exedexes.c2
-rw-r--r--src/mame/video/exerion.c2
-rw-r--r--src/mame/video/fastfred.c6
-rw-r--r--src/mame/video/fastlane.c2
-rw-r--r--src/mame/video/fcombat.c2
-rw-r--r--src/mame/video/finalizr.c2
-rw-r--r--src/mame/video/firetrap.c2
-rw-r--r--src/mame/video/firetrk.c14
-rw-r--r--src/mame/video/flower.c2
-rw-r--r--src/mame/video/foodf.c2
-rw-r--r--src/mame/video/funkybee.c2
-rw-r--r--src/mame/video/funworld.c2
-rw-r--r--src/mame/video/fuukifg2.c2
-rw-r--r--src/mame/video/gaelco2.c4
-rw-r--r--src/mame/video/galaga.c4
-rw-r--r--src/mame/video/galaxian.c62
-rw-r--r--src/mame/video/galaxold.c14
-rw-r--r--src/mame/video/galivan.c2
-rw-r--r--src/mame/video/gameplan.c4
-rw-r--r--src/mame/video/gaplus.c2
-rw-r--r--src/mame/video/gberet.c2
-rw-r--r--src/mame/video/gomoku.c2
-rw-r--r--src/mame/video/gottlieb.c2
-rw-r--r--src/mame/video/gotya.c2
-rw-r--r--src/mame/video/grchamp.c22
-rw-r--r--src/mame/video/gsword.c4
-rw-r--r--src/mame/video/gticlub.c2
-rw-r--r--src/mame/video/gunsmoke.c2
-rw-r--r--src/mame/video/gyruss.c2
-rw-r--r--src/mame/video/hanaawas.c2
-rw-r--r--src/mame/video/harddriv.c2
-rw-r--r--src/mame/video/hcastle.c2
-rw-r--r--src/mame/video/higemaru.c2
-rw-r--r--src/mame/video/hng64.c40
-rw-r--r--src/mame/video/homerun.c2
-rw-r--r--src/mame/video/hyhoo.c10
-rw-r--r--src/mame/video/hyperspt.c2
-rw-r--r--src/mame/video/ikki.c2
-rw-r--r--src/mame/video/irobot.c4
-rw-r--r--src/mame/video/ironhors.c2
-rw-r--r--src/mame/video/itech32.c8
-rw-r--r--src/mame/video/itech8.c2
-rw-r--r--src/mame/video/jack.c2
-rw-r--r--src/mame/video/jackal.c2
-rw-r--r--src/mame/video/jaguar.c14
-rw-r--r--src/mame/video/jailbrek.c2
-rw-r--r--src/mame/video/jalblend.c14
-rw-r--r--src/mame/video/jedi.c4
-rw-r--r--src/mame/video/jpmimpct.c2
-rw-r--r--src/mame/video/k001006.c2
-rw-r--r--src/mame/video/k053246_k053247_k055673.c8
-rw-r--r--src/mame/video/kangaroo.c2
-rw-r--r--src/mame/video/karnov.c2
-rw-r--r--src/mame/video/kingobox.c4
-rw-r--r--src/mame/video/kncljoe.c4
-rw-r--r--src/mame/video/konamigx.c8
-rw-r--r--src/mame/video/kopunch.c2
-rw-r--r--src/mame/video/labyrunr.c2
-rw-r--r--src/mame/video/ladybug.c6
-rw-r--r--src/mame/video/lasso.c2
-rw-r--r--src/mame/video/lastduel.c2
-rw-r--r--src/mame/video/liberate.c4
-rw-r--r--src/mame/video/liberatr.c4
-rw-r--r--src/mame/video/lockon.c2
-rw-r--r--src/mame/video/lucky74.c4
-rw-r--r--src/mame/video/lvcards.c4
-rw-r--r--src/mame/video/m52.c6
-rw-r--r--src/mame/video/m57.c4
-rw-r--r--src/mame/video/m58.c6
-rw-r--r--src/mame/video/m62.c2
-rw-r--r--src/mame/video/madalien.c2
-rw-r--r--src/mame/video/magmax.c2
-rw-r--r--src/mame/video/mainsnk.c2
-rw-r--r--src/mame/video/malzak.c2
-rw-r--r--src/mame/video/mappy.c6
-rw-r--r--src/mame/video/marineb.c2
-rw-r--r--src/mame/video/markham.c2
-rw-r--r--src/mame/video/matmania.c4
-rw-r--r--src/mame/video/mcr.c4
-rw-r--r--src/mame/video/mcr3.c12
-rw-r--r--src/mame/video/megazone.c2
-rw-r--r--src/mame/video/mermaid.c8
-rw-r--r--src/mame/video/mikie.c2
-rw-r--r--src/mame/video/model2rd.inc4
-rw-r--r--src/mame/video/model3.c16
-rw-r--r--src/mame/video/mouser.c2
-rw-r--r--src/mame/video/mrdo.c2
-rw-r--r--src/mame/video/mrjong.c2
-rw-r--r--src/mame/video/ms32.c2
-rw-r--r--src/mame/video/munchmo.c2
-rw-r--r--src/mame/video/mustache.c2
-rw-r--r--src/mame/video/mw8080bw.c30
-rw-r--r--src/mame/video/mystston.c2
-rw-r--r--src/mame/video/n8080.c8
-rw-r--r--src/mame/video/namcos1.c4
-rw-r--r--src/mame/video/namcos2.c2
-rw-r--r--src/mame/video/namcos21.c2
-rw-r--r--src/mame/video/namcos22.c2
-rw-r--r--src/mame/video/namcos86.c2
-rw-r--r--src/mame/video/naughtyb.c2
-rw-r--r--src/mame/video/nbmj8688.c2
-rw-r--r--src/mame/video/nbmj9195.c2
-rw-r--r--src/mame/video/nemesis.c2
-rw-r--r--src/mame/video/neogeo.c2
-rw-r--r--src/mame/video/niyanpai.c4
-rw-r--r--src/mame/video/nova2001.c2
-rw-r--r--src/mame/video/ojankohs.c2
-rw-r--r--src/mame/video/pacland.c2
-rw-r--r--src/mame/video/pacman.c2
-rw-r--r--src/mame/video/pandoras.c2
-rw-r--r--src/mame/video/pastelg.c2
-rw-r--r--src/mame/video/pcktgal.c2
-rw-r--r--src/mame/video/pgm.c2
-rw-r--r--src/mame/video/pingpong.c2
-rw-r--r--src/mame/video/pitnrun.c2
-rw-r--r--src/mame/video/pk8000.c32
-rw-r--r--src/mame/video/playch10.c2
-rw-r--r--src/mame/video/polepos.c2
-rw-r--r--src/mame/video/policetr.c2
-rw-r--r--src/mame/video/polyplay.c22
-rw-r--r--src/mame/video/pooyan.c2
-rw-r--r--src/mame/video/popeye.c6
-rw-r--r--src/mame/video/portrait.c6
-rw-r--r--src/mame/video/powervr2.c2
-rw-r--r--src/mame/video/psikyosh.c4
-rw-r--r--src/mame/video/psychic5.c6
-rw-r--r--src/mame/video/punchout.c4
-rw-r--r--src/mame/video/qix.c2
-rw-r--r--src/mame/video/quasar.c10
-rw-r--r--src/mame/video/rallyx.c6
-rw-r--r--src/mame/video/redalert.c12
-rw-r--r--src/mame/video/redclash.c4
-rw-r--r--src/mame/video/retofinv.c2
-rw-r--r--src/mame/video/rockrage.c2
-rw-r--r--src/mame/video/rocnrope.c2
-rw-r--r--src/mame/video/rollrace.c2
-rw-r--r--src/mame/video/route16.c4
-rw-r--r--src/mame/video/runaway.c2
-rw-r--r--src/mame/video/sbasketb.c2
-rw-r--r--src/mame/video/sbugger.c4
-rw-r--r--src/mame/video/scotrsht.c2
-rw-r--r--src/mame/video/segag80r.c4
-rw-r--r--src/mame/video/seicross.c2
-rw-r--r--src/mame/video/senjyo.c4
-rw-r--r--src/mame/video/seta.c8
-rw-r--r--src/mame/video/shangkid.c2
-rw-r--r--src/mame/video/shaolins.c2
-rw-r--r--src/mame/video/shootout.c2
-rw-r--r--src/mame/video/sidepckt.c2
-rw-r--r--src/mame/video/skyfox.c4
-rw-r--r--src/mame/video/skykid.c2
-rw-r--r--src/mame/video/snes.c10
-rw-r--r--src/mame/video/snk.c2
-rw-r--r--src/mame/video/snk6502.c4
-rw-r--r--src/mame/video/snookr10.c6
-rw-r--r--src/mame/video/sonson.c2
-rw-r--r--src/mame/video/spacefb.c6
-rw-r--r--src/mame/video/spdodgeb.c2
-rw-r--r--src/mame/video/speedatk.c2
-rw-r--r--src/mame/video/sprcros2.c4
-rw-r--r--src/mame/video/sprint2.c8
-rw-r--r--src/mame/video/sprint4.c12
-rw-r--r--src/mame/video/sprint8.c36
-rw-r--r--src/mame/video/ssozumo.c4
-rw-r--r--src/mame/video/ssv.c2
-rw-r--r--src/mame/video/stactics.c2
-rw-r--r--src/mame/video/starfire.c2
-rw-r--r--src/mame/video/starshp1.c16
-rw-r--r--src/mame/video/stfight.c2
-rw-r--r--src/mame/video/strnskil.c2
-rw-r--r--src/mame/video/subs.c16
-rw-r--r--src/mame/video/suprloco.c6
-rw-r--r--src/mame/video/suprnova.c4
-rw-r--r--src/mame/video/suprridr.c2
-rw-r--r--src/mame/video/system1.c2
-rw-r--r--src/mame/video/system16.c4
-rw-r--r--src/mame/video/taito_b.c4
-rw-r--r--src/mame/video/taito_f3.c2
-rw-r--r--src/mame/video/taito_l.c2
-rw-r--r--src/mame/video/taitojc.c2
-rw-r--r--src/mame/video/taitosj.c2
-rw-r--r--src/mame/video/tank8.c36
-rw-r--r--src/mame/video/tankbatt.c2
-rw-r--r--src/mame/video/tc0110pcr.c2
-rw-r--r--src/mame/video/tceptor.c2
-rw-r--r--src/mame/video/terracre.c2
-rw-r--r--src/mame/video/thepit.c2
-rw-r--r--src/mame/video/thief.c2
-rw-r--r--src/mame/video/tia.c12
-rw-r--r--src/mame/video/tiamc1.c2
-rw-r--r--src/mame/video/timelimt.c2
-rw-r--r--src/mame/video/timeplt.c2
-rw-r--r--src/mame/video/toobin.c2
-rw-r--r--src/mame/video/toypop.c2
-rw-r--r--src/mame/video/tp84.c2
-rw-r--r--src/mame/video/trackfld.c2
-rw-r--r--src/mame/video/travrusa.c8
-rw-r--r--src/mame/video/truco.c2
-rw-r--r--src/mame/video/tryout.c2
-rw-r--r--src/mame/video/tubep.c6
-rw-r--r--src/mame/video/tunhunt.c2
-rw-r--r--src/mame/video/turbo.c6
-rw-r--r--src/mame/video/tutankhm.c2
-rw-r--r--src/mame/video/tx1.c4
-rw-r--r--src/mame/video/ultratnk.c8
-rw-r--r--src/mame/video/undrfire.c2
-rw-r--r--src/mame/video/usgames.c2
-rw-r--r--src/mame/video/vaportra.c2
-rw-r--r--src/mame/video/vicdual.c18
-rw-r--r--src/mame/video/vigilant.c6
-rw-r--r--src/mame/video/vindictr.c2
-rw-r--r--src/mame/video/vulgus.c2
-rw-r--r--src/mame/video/warpwarp.c12
-rw-r--r--src/mame/video/wecleman.c4
-rw-r--r--src/mame/video/williams.c8
-rw-r--r--src/mame/video/wiping.c2
-rw-r--r--src/mame/video/wiz.c2
-rw-r--r--src/mame/video/wolfpack.c18
-rw-r--r--src/mame/video/xevious.c8
-rw-r--r--src/mame/video/xorworld.c2
-rw-r--r--src/mame/video/xyonix.c2
-rw-r--r--src/mame/video/yiear.c2
-rw-r--r--src/mame/video/zaccaria.c4
-rw-r--r--src/mame/video/zaxxon.c2
-rw-r--r--src/mame/video/zodiack.c4
-rw-r--r--src/mess/drivers/a5105.c2
-rw-r--r--src/mess/drivers/a7800.c896
-rw-r--r--src/mess/drivers/alesis.c4
-rw-r--r--src/mess/drivers/alphasma.c4
-rw-r--r--src/mess/drivers/apexc.c8
-rw-r--r--src/mess/drivers/apple2.c32
-rw-r--r--src/mess/drivers/applix.c2
-rw-r--r--src/mess/drivers/apricot.c2
-rw-r--r--src/mess/drivers/arcadia.c16
-rw-r--r--src/mess/drivers/bbc.c16
-rw-r--r--src/mess/drivers/c64dtv.c2
-rw-r--r--src/mess/drivers/camplynx.c2
-rw-r--r--src/mess/drivers/casloopy.c2
-rw-r--r--src/mess/drivers/cgenie.c4
-rw-r--r--src/mess/drivers/clcd.c4
-rw-r--r--src/mess/drivers/compucolor.c2
-rw-r--r--src/mess/drivers/cxhumax.c2
-rw-r--r--src/mess/drivers/cybiko.c2
-rw-r--r--src/mess/drivers/einstein.c4
-rw-r--r--src/mess/drivers/electron.c16
-rw-r--r--src/mess/drivers/gp2x.c2
-rw-r--r--src/mess/drivers/gp32.c2
-rw-r--r--src/mess/drivers/hprot1.c4
-rw-r--r--src/mess/drivers/hyperscan.c6
-rw-r--r--src/mess/drivers/ie15.c2
-rw-r--r--src/mess/drivers/intv.c4
-rw-r--r--src/mess/drivers/lcmate2.c4
-rw-r--r--src/mess/drivers/mac.c16
-rw-r--r--src/mess/drivers/micronic.c4
-rw-r--r--src/mess/drivers/mmodular.c6
-rw-r--r--src/mess/drivers/ms0515.c34
-rw-r--r--src/mess/drivers/mstation.c4
-rw-r--r--src/mess/drivers/nakajies.c4
-rw-r--r--src/mess/drivers/p2000t.c8
-rw-r--r--src/mess/drivers/pb1000.c4
-rw-r--r--src/mess/drivers/pc1500.c4
-rw-r--r--src/mess/drivers/pc2000.c4
-rw-r--r--src/mess/drivers/pc4.c4
-rw-r--r--src/mess/drivers/pc6001.c56
-rw-r--r--src/mess/drivers/pc8001.c16
-rw-r--r--src/mess/drivers/pce220.c4
-rw-r--r--src/mess/drivers/pdp1.c6
-rw-r--r--src/mess/drivers/pokemini.c8
-rw-r--r--src/mess/drivers/portfoli.c4
-rw-r--r--src/mess/drivers/prestige.c4
-rw-r--r--src/mess/drivers/psion.c4
-rw-r--r--src/mess/drivers/px4.c8
-rw-r--r--src/mess/drivers/rd110.c4
-rw-r--r--src/mess/drivers/replicator.c4
-rw-r--r--src/mess/drivers/rex6000.c4
-rw-r--r--src/mess/drivers/rmt32.c4
-rw-r--r--src/mess/drivers/rt1715.c6
-rw-r--r--src/mess/drivers/rx78.c4
-rw-r--r--src/mess/drivers/samcoupe.c2
-rw-r--r--src/mess/drivers/sm1800.c4
-rw-r--r--src/mess/drivers/socrates.c2
-rw-r--r--src/mess/drivers/studio2.c8
-rw-r--r--src/mess/drivers/svmu.c4
-rw-r--r--src/mess/drivers/ti89.c4
-rw-r--r--src/mess/drivers/ti99_2.c4
-rw-r--r--src/mess/drivers/tim100.c6
-rw-r--r--src/mess/drivers/trs80m2.c2
-rw-r--r--src/mess/drivers/tx0.c6
-rw-r--r--src/mess/drivers/unior.c6
-rw-r--r--src/mess/drivers/uzebox.c2
-rw-r--r--src/mess/drivers/vboy.c8
-rw-r--r--src/mess/drivers/vc4000.c16
-rw-r--r--src/mess/drivers/vta2000.c2
-rw-r--r--src/mess/drivers/vtech1.c32
-rw-r--r--src/mess/drivers/vtech2.c32
-rw-r--r--src/mess/drivers/x07.c4
-rw-r--r--src/mess/drivers/x1.c4
-rw-r--r--src/mess/drivers/ymmu100.c4
-rw-r--r--src/mess/drivers/z80ne.c36
-rw-r--r--src/mess/drivers/zx.c16
-rw-r--r--src/mess/machine/amstrad.c128
-rw-r--r--src/mess/machine/pk8020.c2
-rw-r--r--src/mess/machine/s3c44b0.c4
-rw-r--r--src/mess/machine/sms.c8
-rw-r--r--src/mess/machine/sms_lphaser.c2
-rw-r--r--src/mess/machine/vector06.c2
-rw-r--r--src/mess/video/733_asr.c4
-rw-r--r--src/mess/video/911_vdt.c2
-rw-r--r--src/mess/video/abc1600.c2
-rw-r--r--src/mess/video/abc800.c22
-rw-r--r--src/mess/video/abc806.c18
-rw-r--r--src/mess/video/aquarius.c32
-rw-r--r--src/mess/video/avigo.c4
-rw-r--r--src/mess/video/b2m.c8
-rw-r--r--src/mess/video/bbc.c2
-rw-r--r--src/mess/video/busicom.c6
-rw-r--r--src/mess/video/cgc7900.c18
-rw-r--r--src/mess/video/channelf.c16
-rw-r--r--src/mess/video/fm7.c24
-rw-r--r--src/mess/video/gf4500.c2
-rw-r--r--src/mess/video/hec2video.c32
-rw-r--r--src/mess/video/hp48.c2
-rw-r--r--src/mess/video/kaypro.c6
-rw-r--r--src/mess/video/kyocera.c8
-rw-r--r--src/mess/video/mac.c8
-rw-r--r--src/mess/video/mbee.c12
-rw-r--r--src/mess/video/mos6566.c32
-rw-r--r--src/mess/video/mz700.c2
-rw-r--r--src/mess/video/nc.c8
-rw-r--r--src/mess/video/newbrain.c2
-rw-r--r--src/mess/video/nick.c2
-rw-r--r--src/mess/video/orion.c36
-rw-r--r--src/mess/video/pc1512.c34
-rw-r--r--src/mess/video/pc8401a.c4
-rw-r--r--src/mess/video/pcw.c4
-rw-r--r--src/mess/video/pcw16.c64
-rw-r--r--src/mess/video/pds_tpdfpd.c6
-rw-r--r--src/mess/video/pk8020.c2
-rw-r--r--src/mess/video/pocketc.c2
-rw-r--r--src/mess/video/pp01.c16
-rw-r--r--src/mess/video/radio86.c6
-rw-r--r--src/mess/video/special.c52
-rw-r--r--src/mess/video/spectrum.c32
-rw-r--r--src/mess/video/super80.c2
-rw-r--r--src/mess/video/ti85.c6
-rw-r--r--src/mess/video/trs80.c16
-rw-r--r--src/mess/video/uv201.c16
-rw-r--r--src/mess/video/vector06.c2
-rw-r--r--src/mess/video/z88.c6
-rw-r--r--src/mess/video/zx8301.c18
-rw-r--r--src/osd/osdepend.c4
-rw-r--r--src/osd/sdl/blit13.h6
-rw-r--r--src/osd/sdl/sdlmain.c14
-rw-r--r--src/osd/sdl/texcopy.c2
-rw-r--r--src/osd/sdl/texsrc.h6
-rw-r--r--src/osd/windows/drawd3d.c30
-rw-r--r--src/osd/windows/winmain.c6
724 files changed, 3129 insertions, 3236 deletions
diff --git a/src/emu/bus/a2bus/a2ultraterm.c b/src/emu/bus/a2bus/a2ultraterm.c
index 0c5ffa1ec09..bf5ac0cf8f1 100644
--- a/src/emu/bus/a2bus/a2ultraterm.c
+++ b/src/emu/bus/a2bus/a2ultraterm.c
@@ -80,10 +80,10 @@ static MC6845_INTERFACE( mc6845_mda_intf )
static const rgb_t ultraterm_palette[4] =
{
- MAKE_RGB(0x00,0x00,0x00),
- MAKE_RGB(0x55,0x55,0x55),
- MAKE_RGB(0xaa,0xaa,0xaa),
- MAKE_RGB(0xff,0xff,0xff)
+ rgb_t(0x00,0x00,0x00),
+ rgb_t(0x55,0x55,0x55),
+ rgb_t(0xaa,0xaa,0xaa),
+ rgb_t(0xff,0xff,0xff)
};
MACHINE_CONFIG_FRAGMENT( a2ultraterm )
diff --git a/src/emu/bus/iq151/minigraf.c b/src/emu/bus/iq151/minigraf.c
index 600c3919fbc..1cec65a47d1 100644
--- a/src/emu/bus/iq151/minigraf.c
+++ b/src/emu/bus/iq151/minigraf.c
@@ -82,7 +82,7 @@ void iq151_minigraf_device::device_stop()
if (filerr == FILERR_NONE)
{
- static const rgb_t png_palette[] = { RGB_WHITE, RGB_BLACK };
+ static const rgb_t png_palette[] = { rgb_t::white, rgb_t::black };
// save the paper into a png
png_write_bitmap(file, NULL, *m_paper, 2, png_palette);
diff --git a/src/emu/bus/iq151/ms151a.c b/src/emu/bus/iq151/ms151a.c
index a1c0c6dc08d..67909362f8e 100644
--- a/src/emu/bus/iq151/ms151a.c
+++ b/src/emu/bus/iq151/ms151a.c
@@ -81,7 +81,7 @@ void iq151_ms151a_device::device_stop()
if (filerr == FILERR_NONE)
{
- static const rgb_t png_palette[] = { RGB_WHITE, RGB_BLACK };
+ static const rgb_t png_palette[] = { rgb_t::white, rgb_t::black };
// save the paper into a png
png_write_bitmap(file, NULL, *m_paper, 2, png_palette);
diff --git a/src/emu/bus/nubus/nubus_48gc.c b/src/emu/bus/nubus/nubus_48gc.c
index a905fb5b8b7..ac5819ee472 100644
--- a/src/emu/bus/nubus/nubus_48gc.c
+++ b/src/emu/bus/nubus/nubus_48gc.c
@@ -303,7 +303,7 @@ WRITE32_MEMBER( jmfb_device::mac_48gc_w )
if (m_count == 3)
{
// printf("RAMDAC: color %d = %02x %02x %02x\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2]);
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
m_count = 0;
}
diff --git a/src/emu/bus/nubus/nubus_cb264.c b/src/emu/bus/nubus/nubus_cb264.c
index b67e93e708f..2128cc9b344 100644
--- a/src/emu/bus/nubus/nubus_cb264.c
+++ b/src/emu/bus/nubus/nubus_cb264.c
@@ -281,7 +281,7 @@ WRITE32_MEMBER( nubus_cb264_device::cb264_ramdac_w )
if (m_count == 3)
{
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
m_count = 0;
}
diff --git a/src/emu/bus/nubus/nubus_m2hires.c b/src/emu/bus/nubus/nubus_m2hires.c
index 592907269c0..284b878c109 100644
--- a/src/emu/bus/nubus/nubus_m2hires.c
+++ b/src/emu/bus/nubus/nubus_m2hires.c
@@ -121,8 +121,8 @@ void nubus_m2hires_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -261,7 +261,7 @@ WRITE32_MEMBER( nubus_m2hires_device::m2hires_w )
if (m_count == 3)
{
// printf("RAMDAC: color %d = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/nubus_m2video.c b/src/emu/bus/nubus/nubus_m2video.c
index c5f3a6c0d3c..1b69cbac6e6 100644
--- a/src/emu/bus/nubus/nubus_m2video.c
+++ b/src/emu/bus/nubus/nubus_m2video.c
@@ -122,8 +122,8 @@ void nubus_m2video_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -261,7 +261,7 @@ WRITE32_MEMBER( nubus_m2video_device::m2video_w )
if (m_count == 3)
{
// printf("RAMDAC: color %02x = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/nubus_radiustpd.c b/src/emu/bus/nubus/nubus_radiustpd.c
index d44333e5f06..9ddf1242106 100644
--- a/src/emu/bus/nubus/nubus_radiustpd.c
+++ b/src/emu/bus/nubus/nubus_radiustpd.c
@@ -122,8 +122,8 @@ void nubus_radiustpd_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[1] = MAKE_RGB(255, 255, 255);
- m_palette[0] = MAKE_RGB(0, 0, 0);
+ m_palette[1] = rgb_t(255, 255, 255);
+ m_palette[0] = rgb_t(0, 0, 0);
}
diff --git a/src/emu/bus/nubus/nubus_spec8.c b/src/emu/bus/nubus/nubus_spec8.c
index 3f6496c524f..e3cba7987d0 100644
--- a/src/emu/bus/nubus/nubus_spec8.c
+++ b/src/emu/bus/nubus/nubus_spec8.c
@@ -124,8 +124,8 @@ void nubus_spec8s3_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[1] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[1] = rgb_t(0, 0, 0);
}
@@ -263,7 +263,7 @@ WRITE32_MEMBER( nubus_spec8s3_device::spec8s3_w )
int actual_color = BITSWAP8(m_clutoffs, 0, 1, 2, 3, 4, 5, 6, 7);
// printf("RAMDAC: color %d = %02x %02x %02x (PC=%x)\n", actual_color, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[actual_color] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[actual_color] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/nubus_specpdq.c b/src/emu/bus/nubus/nubus_specpdq.c
index 2ac5ddd90d8..d154f3133fa 100644
--- a/src/emu/bus/nubus/nubus_specpdq.c
+++ b/src/emu/bus/nubus/nubus_specpdq.c
@@ -134,8 +134,8 @@ void nubus_specpdq_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -297,8 +297,8 @@ WRITE32_MEMBER( nubus_specpdq_device::specpdq_w )
if (m_count == 3)
{
// printf("RAMDAC: color %d = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- palette_set_color(space.machine(), m_clutoffs, MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]));
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ palette_set_color(space.machine(), m_clutoffs, rgb_t(m_colors[0], m_colors[1], m_colors[2]));
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/nubus_vikbw.c b/src/emu/bus/nubus/nubus_vikbw.c
index a4635004f44..3d60508158b 100644
--- a/src/emu/bus/nubus/nubus_vikbw.c
+++ b/src/emu/bus/nubus/nubus_vikbw.c
@@ -108,8 +108,8 @@ void nubus_vikbw_device::device_reset()
m_vbl_disable = 1;
memset(m_vram, 0, VRAM_SIZE);
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[1] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[1] = rgb_t(0, 0, 0);
}
/***************************************************************************
diff --git a/src/emu/bus/nubus/nubus_wsportrait.c b/src/emu/bus/nubus/nubus_wsportrait.c
index 4b184e4c1ae..aa5b619a546 100644
--- a/src/emu/bus/nubus/nubus_wsportrait.c
+++ b/src/emu/bus/nubus/nubus_wsportrait.c
@@ -250,7 +250,7 @@ WRITE32_MEMBER( nubus_wsportrait_device::wsportrait_w )
if (m_count == 3)
{
// printf("RAMDAC: color %d = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[2], m_colors[2], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[2], m_colors[2], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/pds30_30hr.c b/src/emu/bus/nubus/pds30_30hr.c
index e31cb2d7719..f4fa47441f2 100644
--- a/src/emu/bus/nubus/pds30_30hr.c
+++ b/src/emu/bus/nubus/pds30_30hr.c
@@ -123,8 +123,8 @@ void nubus_xceed30hr_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -267,7 +267,7 @@ WRITE32_MEMBER( nubus_xceed30hr_device::xceed30hr_w )
if (m_count == 3)
{
// printf("RAMDAC: color %02x = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/pds30_cb264.c b/src/emu/bus/nubus/pds30_cb264.c
index 1d8c3bbc356..baf21814889 100644
--- a/src/emu/bus/nubus/pds30_cb264.c
+++ b/src/emu/bus/nubus/pds30_cb264.c
@@ -116,8 +116,8 @@ void nubus_cb264se30_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -278,7 +278,7 @@ WRITE32_MEMBER( nubus_cb264se30_device::cb264se30_w )
if (m_count == 3)
{
// printf("RAMDAC: color %02x = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/pds30_mc30.c b/src/emu/bus/nubus/pds30_mc30.c
index 3ea20a0771b..d42ab80d7fc 100644
--- a/src/emu/bus/nubus/pds30_mc30.c
+++ b/src/emu/bus/nubus/pds30_mc30.c
@@ -119,8 +119,8 @@ void nubus_xceedmc30_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -284,7 +284,7 @@ WRITE32_MEMBER( nubus_xceedmc30_device::xceedmc30_w )
if (m_count == 3)
{
// printf("RAMDAC: color %02x = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/pds30_procolor816.c b/src/emu/bus/nubus/pds30_procolor816.c
index f204b90ab93..0e2238e8bcc 100644
--- a/src/emu/bus/nubus/pds30_procolor816.c
+++ b/src/emu/bus/nubus/pds30_procolor816.c
@@ -123,8 +123,8 @@ void nubus_procolor816_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
@@ -229,7 +229,7 @@ UINT32 nubus_procolor816_device::screen_update(screen_device &screen, bitmap_rgb
for (x = 0; x < 640; x++)
{
pixels = vram16[(y * 640) + (x^1)];
- *scanline++ = MAKE_RGB(((pixels>>10) & 0x1f)<<3, ((pixels>>5) & 0x1f)<<3, (pixels & 0x1f)<<3);
+ *scanline++ = rgb_t(((pixels>>10) & 0x1f)<<3, ((pixels>>5) & 0x1f)<<3, (pixels & 0x1f)<<3);
}
}
}
@@ -287,7 +287,7 @@ WRITE32_MEMBER( nubus_procolor816_device::procolor816_w )
if (m_count == 3)
{
// printf("RAMDAC: color %02x = %02x %02x %02x (PC=%x)\n", m_clutoffs, m_colors[0], m_colors[1], m_colors[2], space.device().safe_pc() );
- m_palette[m_clutoffs] = MAKE_RGB(m_colors[0], m_colors[1], m_colors[2]);
+ m_palette[m_clutoffs] = rgb_t(m_colors[0], m_colors[1], m_colors[2]);
m_clutoffs++;
if (m_clutoffs > 255)
{
diff --git a/src/emu/bus/nubus/pds30_sigmalview.c b/src/emu/bus/nubus/pds30_sigmalview.c
index b2efdecc03c..5939a5f11c6 100644
--- a/src/emu/bus/nubus/pds30_sigmalview.c
+++ b/src/emu/bus/nubus/pds30_sigmalview.c
@@ -115,8 +115,8 @@ void nubus_lview_device::device_reset()
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
- m_palette[0] = MAKE_RGB(255, 255, 255);
- m_palette[0x80] = MAKE_RGB(0, 0, 0);
+ m_palette[0] = rgb_t(255, 255, 255);
+ m_palette[0x80] = rgb_t(0, 0, 0);
}
diff --git a/src/emu/bus/wangpc/lvc.c b/src/emu/bus/wangpc/lvc.c
index dc943a70e0d..cb879e00338 100644
--- a/src/emu/bus/wangpc/lvc.c
+++ b/src/emu/bus/wangpc/lvc.c
@@ -350,7 +350,7 @@ void wangpc_lvc_device::wangpcbus_aiowc_w(address_space &space, offs_t offset, U
int g = BIT(data, 7) ? (i ? 0xff : 0x80) : 0;
int b = BIT(data, 3) ? (i ? 0xff : 0x80) : 0;
- m_palette[index] = MAKE_RGB(r, g, b);
+ m_palette[index] = rgb_t(r, g, b);
}
break;
diff --git a/src/emu/bus/wangpc/mvc.c b/src/emu/bus/wangpc/mvc.c
index 851c31958ac..7c55635b3f6 100644
--- a/src/emu/bus/wangpc/mvc.c
+++ b/src/emu/bus/wangpc/mvc.c
@@ -51,9 +51,9 @@
static const rgb_t PALETTE[] =
{
- RGB_BLACK,
- MAKE_RGB(0x00, 0x80, 0x00),
- MAKE_RGB(0x00, 0xff, 0x00)
+ rgb_t::black,
+ rgb_t(0x00, 0x80, 0x00),
+ rgb_t(0x00, 0xff, 0x00)
};
diff --git a/src/emu/crsshair.c b/src/emu/crsshair.c
index c693468f2f8..70e9f05ac93 100644
--- a/src/emu/crsshair.c
+++ b/src/emu/crsshair.c
@@ -116,13 +116,13 @@ static const UINT8 crosshair_raw_top[] =
/* per-player colors */
static const rgb_t crosshair_colors[] =
{
- MAKE_RGB(0x40,0x40,0xff),
- MAKE_RGB(0xff,0x40,0x40),
- MAKE_RGB(0x40,0xff,0x40),
- MAKE_RGB(0xff,0xff,0x40),
- MAKE_RGB(0xff,0x40,0xff),
- MAKE_RGB(0x40,0xff,0xff),
- MAKE_RGB(0xff,0xff,0xff)
+ rgb_t(0x40,0x40,0xff),
+ rgb_t(0xff,0x40,0x40),
+ rgb_t(0x40,0xff,0x40),
+ rgb_t(0xff,0xff,0x40),
+ rgb_t(0xff,0x40,0xff),
+ rgb_t(0x40,0xff,0xff),
+ rgb_t(0xff,0xff,0xff)
};
@@ -181,7 +181,7 @@ static void create_bitmap(running_machine &machine, int player)
{
/* allocate a blank bitmap to start with */
global.bitmap[player]->allocate(CROSSHAIR_RAW_SIZE, CROSSHAIR_RAW_SIZE);
- global.bitmap[player]->fill(MAKE_ARGB(0x00,0xff,0xff,0xff));
+ global.bitmap[player]->fill(rgb_t(0x00,0xff,0xff,0xff));
/* extract the raw source data to it */
for (y = 0; y < CROSSHAIR_RAW_SIZE / 2; y++)
@@ -193,7 +193,7 @@ static void create_bitmap(running_machine &machine, int player)
/* extract to two rows simultaneously */
for (x = 0; x < CROSSHAIR_RAW_SIZE; x++)
if ((crosshair_raw_top[y * CROSSHAIR_RAW_ROWBYTES + x / 8] << (x % 8)) & 0x80)
- dest0[x] = dest1[x] = MAKE_ARGB(0xff,0x00,0x00,0x00) | color;
+ dest0[x] = dest1[x] = rgb_t(0xff,0x00,0x00,0x00) | color;
}
}
@@ -394,7 +394,7 @@ void crosshair_render(screen_device &screen)
/* add a quad assuming a 4:3 screen (this is not perfect) */
screen.container().add_quad(global.x[player] - 0.03f, global.y[player] - 0.04f,
global.x[player] + 0.03f, global.y[player] + 0.04f,
- MAKE_ARGB(0xc0, global.fade, global.fade, global.fade),
+ rgb_t(0xc0, global.fade, global.fade, global.fade),
global.texture[player], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
}
}
diff --git a/src/emu/debugint/debugint.c b/src/emu/debugint/debugint.c
index c0dffc22018..0d6df253b5c 100644
--- a/src/emu/debugint/debugint.c
+++ b/src/emu/debugint/debugint.c
@@ -387,8 +387,8 @@ static void dview_draw_hsb(DView *dv)
dview_get_rect(dv, RECT_DVIEW_HSB, r);
- dview_draw_outlined_box(dv, RECT_DVIEW_HSB, 0, 0, VSB_WIDTH,HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00));
- dview_draw_outlined_box(dv, RECT_DVIEW_HSB, r.width() - VSB_WIDTH, 0, VSB_WIDTH, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00));
+ dview_draw_outlined_box(dv, RECT_DVIEW_HSB, 0, 0, VSB_WIDTH,HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00));
+ dview_draw_outlined_box(dv, RECT_DVIEW_HSB, r.width() - VSB_WIDTH, 0, VSB_WIDTH, HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00));
ts = (r.width()) - 2 * VSB_WIDTH;
@@ -397,7 +397,7 @@ static void dview_draw_hsb(DView *dv)
vt = (ts * (sb->value - sb->lower)) / (sb->upper - sb->lower - sb->page_size) + sz / 2 + r.min_x + VSB_WIDTH;
- dview_draw_outlined_box(dv, RECT_DVIEW_HSB, vt - sz / 2, 0, sz, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00));
+ dview_draw_outlined_box(dv, RECT_DVIEW_HSB, vt - sz / 2, 0, sz, HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00));
}
static void dview_draw_vsb(DView *dv)
@@ -411,8 +411,8 @@ static void dview_draw_vsb(DView *dv)
dview_get_rect(dv, RECT_DVIEW_VSB, r);
- dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, r.height() - HSB_HEIGHT, VSB_WIDTH, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00));
- dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, 0, VSB_WIDTH, HSB_HEIGHT, MAKE_ARGB(0xff, 0xff, 0x00, 0x00));
+ dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, r.height() - HSB_HEIGHT, VSB_WIDTH, HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00));
+ dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, 0, VSB_WIDTH, HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00));
ts = r.height() - 2 * HSB_HEIGHT;
@@ -421,7 +421,7 @@ static void dview_draw_vsb(DView *dv)
vt = (ts * (sb->value - sb->lower)) / (sb->upper - sb->lower - sb->page_size) + sz / 2 + HSB_HEIGHT;
- dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, vt - sz / 2, VSB_WIDTH, sz, MAKE_ARGB(0xff, 0xff, 0x00, 0x00));
+ dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, vt - sz / 2, VSB_WIDTH, sz, rgb_t(0xff, 0xff, 0x00, 0x00));
}
static void dview_draw_size(DView *dv)
@@ -431,7 +431,7 @@ static void dview_draw_size(DView *dv)
dview_get_rect(dv, RECT_DVIEW_SIZE, r);
dview_draw_outlined_box(dv, RECT_DVIEW_SIZE, 0, 0,
- r.width(),r.height(), MAKE_ARGB(0xff, 0xff, 0xff, 0x00));
+ r.width(),r.height(), rgb_t(0xff, 0xff, 0xff, 0x00));
}
static void dview_set_title(DView *dv, astring title)
@@ -446,13 +446,13 @@ static void dview_set_title(DView *dv, astring title)
static void dview_draw_title(DView *dv)
{
int i;
- rgb_t col = MAKE_ARGB(0xff,0x00,0x00,0xff);
+ rgb_t col = rgb_t(0xff,0x00,0x00,0xff);
rectangle r;
dview_get_rect(dv, RECT_DVIEW_TITLE, r);
if (dv == focus_view)
- col = MAKE_ARGB(0xff,0x00,0x7f,0x00);
+ col = rgb_t(0xff,0x00,0x7f,0x00);
dview_draw_outlined_box(dv, RECT_DVIEW_TITLE, 0, 0, dv->bounds.width(), TITLE_HEIGHT, col);
@@ -463,7 +463,7 @@ static void dview_draw_title(DView *dv)
{
dview_draw_char(dv, RECT_DVIEW_TITLE, i * debug_font_width + BORDER_XTHICKNESS,
BORDER_YTHICKNESS, debug_font_height, //r.max_y - 2 * BORDER_YTHICKNESS,
- MAKE_ARGB(0xff,0xff,0xff,0xff), (UINT16) dv->title[i] );
+ rgb_t(0xff,0xff,0xff,0xff), (UINT16) dv->title[i] );
}
}
@@ -628,31 +628,28 @@ static int dview_on_mouse(DView *dv, int mx, int my, bool button)
INLINE void map_attr_to_fg_bg(unsigned char attr, rgb_t *fg, rgb_t *bg)
{
- *bg = MAKE_ARGB(0xff,0xff,0xff,0xff);
- *fg = MAKE_ARGB(0xff,0x00,0x00,0x00);
+ *bg = rgb_t(0xff,0xff,0xff,0xff);
+ *fg = rgb_t(0xff,0x00,0x00,0x00);
if(attr & DCA_ANCILLARY)
- *bg = MAKE_ARGB(0xff,0xe0,0xe0,0xe0);
+ *bg = rgb_t(0xff,0xe0,0xe0,0xe0);
if(attr & DCA_SELECTED) {
- *bg = MAKE_ARGB(0xff,0xff,0x80,0x80);
+ *bg = rgb_t(0xff,0xff,0x80,0x80);
}
if(attr & DCA_CURRENT) {
- *bg = MAKE_ARGB(0xff,0xff,0xff,0x00);
+ *bg = rgb_t(0xff,0xff,0xff,0x00);
}
if(attr & DCA_CHANGED) {
- *fg = MAKE_ARGB(0xff,0xff,0x00,0x00);
+ *fg = rgb_t(0xff,0xff,0x00,0x00);
}
if(attr & DCA_INVALID) {
- *fg = MAKE_ARGB(0xff,0x00,0x00,0xff);
+ *fg = rgb_t(0xff,0x00,0x00,0xff);
}
if(attr & DCA_DISABLED) {
- *fg = MAKE_ARGB(RGB_ALPHA(*fg),
- (RGB_RED(*fg)+RGB_RED(*bg)) >> 1,
- (RGB_GREEN(*fg)+RGB_GREEN(*bg)) >> 1,
- (RGB_BLUE(*fg)+RGB_BLUE(*bg)) >> 1);
+ *fg = rgb_t(fg->a(), (fg->r() + bg->r()) >> 1, (fg->g() + bg->g()) >> 1, (fg->b() + bg->b()) >> 1);
}
if(attr & DCA_COMMENT) {
- *fg = MAKE_ARGB(0xff,0x00,0x80,0x00);
+ *fg = rgb_t(0xff,0x00,0x80,0x00);
}
}
@@ -666,7 +663,7 @@ static void dview_draw(DView *dv)
vsize = dv->view->visible_size();
- bg_base = MAKE_ARGB(0xff,0xff,0xff,0xff);
+ bg_base = rgb_t(0xff,0xff,0xff,0xff);
/* always start clean */
dview_clear(dv);
diff --git a/src/emu/drawgfx.c b/src/emu/drawgfx.c
index 66c407a8d5f..9abe243035c 100644
--- a/src/emu/drawgfx.c
+++ b/src/emu/drawgfx.c
@@ -1824,8 +1824,8 @@ void gfx_element::prio_zoom_transpen_additive(bitmap_rgb32 &dest, const rectangl
DRAWGFXZOOM_CORE(UINT32, PIXEL_OP_REMAP_TRANSPEN_PRIORITY_ADDIIVE32, UINT8);
}
-//#define MAKE_ARGB_RGB(a, rgb) MAKE_ARGB(a, RGB_RED(rgb), RGB_GREEN(rgb), RGB_BLUE(rgb))
-#define MAKE_ARGB_RGB(a, rgb) ((((rgb_t)(a) & 0xff) << 24) | ((rgb) & 0xffffff))
+//#define MAKE_ARGB_RGB(a, rgb) rgb_t(a, rgb.r(), rgb.g(), rgb.b())
+#define MAKE_ARGB_RGB(a, rgb) rgb_t(rgb).set_a(a)
// combine in 'alpha' when copying to store in ARGB
#define PIXEL_OP_REMAP_TRANS0_ALPHASTORE32(DEST, PRIORITY, SOURCE) \
diff --git a/src/emu/drawgfxm.h b/src/emu/drawgfxm.h
index 6df45adf8ff..fe8c7dae69f 100644
--- a/src/emu/drawgfxm.h
+++ b/src/emu/drawgfxm.h
@@ -234,7 +234,7 @@ do
if (entry == DRAWMODE_SOURCE) \
(DEST) = paldata[srcdata]; \
else \
- (DEST) = shadowtable[rgb_to_rgb15(DEST)]; \
+ (DEST) = shadowtable[rgb_t(DEST).as_rgb15()]; \
} \
} \
while (0)
@@ -276,7 +276,7 @@ do
} \
else if ((pridata & 0x80) == 0 && ((1 << (pridata & 0x1f)) & pmask) == 0) \
{ \
- (DEST) = shadowtable[rgb_to_rgb15(DEST)]; \
+ (DEST) = shadowtable[rgb_t(DEST).as_rgb15()]; \
(PRIORITY) = pridata | 0x80; \
} \
} \
diff --git a/src/emu/driver.c b/src/emu/driver.c
index 65ad6e23d0f..73646b44654 100644
--- a/src/emu/driver.c
+++ b/src/emu/driver.c
@@ -749,7 +749,7 @@ PALETTE_INIT_MEMBER(driver_device, all_black)
for (i = 0; i < machine().total_colors(); i++)
{
- palette_set_color(machine(),i,RGB_BLACK); /* black */
+ palette_set_color(machine(),i,rgb_t::black); /* black */
}
}
@@ -760,8 +760,8 @@ PALETTE_INIT_MEMBER(driver_device, all_black)
PALETTE_INIT_MEMBER(driver_device, black_and_white)
{
- palette_set_color(machine(),0,RGB_BLACK); /* black */
- palette_set_color(machine(),1,RGB_WHITE); /* white */
+ palette_set_color(machine(),0,rgb_t::black); /* black */
+ palette_set_color(machine(),1,rgb_t::white); /* white */
}
@@ -771,7 +771,7 @@ PALETTE_INIT_MEMBER(driver_device, black_and_white)
PALETTE_INIT_MEMBER(driver_device, monochrome_amber)
{
- palette_set_color(machine(), 0, RGB_BLACK); /* black */
+ palette_set_color(machine(), 0, rgb_t::black); /* black */
palette_set_color_rgb(machine(), 1, 0xf7, 0xaa, 0x00); /* amber */
}
@@ -782,7 +782,7 @@ PALETTE_INIT_MEMBER(driver_device, monochrome_amber)
PALETTE_INIT_MEMBER(driver_device, monochrome_green)
{
- palette_set_color(machine(), 0, RGB_BLACK); /* black */
+ palette_set_color(machine(), 0, rgb_t::black); /* black */
palette_set_color_rgb(machine(), 1, 0x00, 0xff, 0x00); /* green */
}
@@ -827,7 +827,7 @@ PALETTE_INIT_MEMBER(driver_device, RRRR_GGGG_BBBB)
bit3 = (color_prom[i + 2*machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
@@ -844,7 +844,7 @@ PALETTE_INIT_MEMBER(driver_device, RRRRR_GGGGG_BBBBB)
int i;
for (i = 0; i < 0x8000; i++)
- palette_set_color(machine(), i, MAKE_RGB(pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0)));
+ palette_set_color(machine(), i, rgb_t(pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0)));
}
@@ -853,7 +853,7 @@ PALETTE_INIT_MEMBER(driver_device, BBBBB_GGGGG_RRRRR)
int i;
for (i = 0; i < 0x8000; i++)
- palette_set_color(machine(), i, MAKE_RGB(pal5bit(i >> 0), pal5bit(i >> 5), pal5bit(i >> 10)));
+ palette_set_color(machine(), i, rgb_t(pal5bit(i >> 0), pal5bit(i >> 5), pal5bit(i >> 10)));
}
@@ -869,5 +869,5 @@ PALETTE_INIT_MEMBER(driver_device, RRRRR_GGGGGG_BBBBB)
int i;
for (i = 0; i < 0x10000; i++)
- palette_set_color(machine(), i, MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 5), pal5bit(i >> 0)));
+ palette_set_color(machine(), i, rgb_t(pal5bit(i >> 11), pal6bit(i >> 5), pal5bit(i >> 0)));
}
diff --git a/src/emu/drivers/empty.c b/src/emu/drivers/empty.c
index e256b2f240e..7a4c08ac256 100644
--- a/src/emu/drivers/empty.c
+++ b/src/emu/drivers/empty.c
@@ -34,7 +34,7 @@ public:
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- bitmap.fill(RGB_BLACK);
+ bitmap.fill(rgb_t::black);
return 0;
}
};
diff --git a/src/emu/emupal.c b/src/emu/emupal.c
index d05220e9b5d..b9a514a260b 100644
--- a/src/emu/emupal.c
+++ b/src/emu/emupal.c
@@ -289,22 +289,21 @@ void palette_set_shadow_dRGB32(running_machine &machine, int mode, int dr, int d
int r = pal5bit(i >> 10) + dr;
int g = pal5bit(i >> 5) + dg;
int b = pal5bit(i >> 0) + db;
- pen_t final;
/* apply clipping */
if (!noclip)
{
- r = rgb_clamp(r);
- g = rgb_clamp(g);
- b = rgb_clamp(b);
+ r = rgb_t::clamp(r);
+ g = rgb_t::clamp(g);
+ b = rgb_t::clamp(b);
}
- final = MAKE_RGB(r, g, b);
+ rgb_t final = rgb_t(r, g, b);
/* store either 16 or 32 bit */
if (palette->format == BITMAP_FORMAT_RGB32)
stable->base[i] = final;
else
- stable->base[i] = rgb_to_rgb15(final);
+ stable->base[i] = final.as_rgb15();
}
}
@@ -342,7 +341,7 @@ colortable_t *colortable_alloc(running_machine &machine, UINT32 palettesize)
/* allocate the palette */
ctable->palette = auto_alloc_array(machine, rgb_t, ctable->palentries);
for (index = 0; index < ctable->palentries; index++)
- ctable->palette[index] = MAKE_ARGB(0x80,0xff,0xff,0xff);
+ ctable->palette[index] = rgb_t(0x80,0xff,0xff,0xff);
machine.save().save_pointer(NAME(ctable->palette), ctable->palentries);
return ctable;
@@ -395,7 +394,7 @@ void colortable_palette_set_color(colortable_t *ctable, UINT32 entry, rgb_t colo
assert(entry < ctable->palentries);
/* alpha doesn't matter */
- color |= 0xff000000;
+ color.set_a(0xff);
/* update if it has changed */
if (ctable->palette[entry] != color)
@@ -603,7 +602,7 @@ static void allocate_palette(running_machine &machine, palette_private *palette)
/* set the initial colors to a standard rainbow */
for (index = 0; index < machine.total_colors(); index++)
- machine.palette->entry_set_color(index, MAKE_RGB(pal1bit(index >> 0), pal1bit(index >> 1), pal1bit(index >> 2)));
+ machine.palette->entry_set_color(index, rgb_t(pal1bit(index >> 0), pal1bit(index >> 1), pal1bit(index >> 2)));
/* switch off the color mode */
switch (palette->format)
@@ -620,8 +619,8 @@ static void allocate_palette(running_machine &machine, palette_private *palette)
/* 32-bit direct case */
case BITMAP_FORMAT_RGB32:
- palette->black_pen = MAKE_RGB(0x00,0x00,0x00);
- palette->white_pen = MAKE_RGB(0xff,0xff,0xff);
+ palette->black_pen = rgb_t(0x00,0x00,0x00);
+ palette->white_pen = rgb_t(0xff,0xff,0xff);
break;
/* screenless case */
@@ -654,7 +653,7 @@ static void allocate_color_tables(running_machine &machine, palette_private *pal
break;
case BITMAP_FORMAT_RGB32:
- machine.pens = machine.palette->entry_list_adjusted();
+ machine.pens = reinterpret_cast<const pen_t *>(machine.palette->entry_list_adjusted());
break;
default:
@@ -741,15 +740,12 @@ static void configure_rgb_shadows(running_machine &machine, int mode, float fact
/* regenerate the table */
for (i = 0; i < 32768; i++)
{
- UINT8 r = rgb_clamp((pal5bit(i >> 10) * ifactor) >> 8);
- UINT8 g = rgb_clamp((pal5bit(i >> 5) * ifactor) >> 8);
- UINT8 b = rgb_clamp((pal5bit(i >> 0) * ifactor) >> 8);
- pen_t final = MAKE_RGB(r, g, b);
+ rgb_t final = pal555(i, 10, 5, 0).scale8(ifactor);
/* store either 16 or 32 bit */
if (palette->format == BITMAP_FORMAT_RGB32)
stable->base[i] = final;
else
- stable->base[i] = rgb_to_rgb15(final);
+ stable->base[i] = final.as_rgb15();
}
}
diff --git a/src/emu/emupal.h b/src/emu/emupal.h
index b3aedf58c2d..dc6a2f5bab9 100644
--- a/src/emu/emupal.h
+++ b/src/emu/emupal.h
@@ -209,7 +209,7 @@ INLINE void palette_set_color(running_machine &machine, pen_t pen, rgb_t rgb)
INLINE void palette_set_color_rgb(running_machine &machine, pen_t pen, UINT8 r, UINT8 g, UINT8 b)
{
- machine.palette->entry_set_color(pen, MAKE_RGB(r, g, b));
+ machine.palette->entry_set_color(pen, rgb_t(r, g, b));
}
diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c
index dfc3c066515..ff56d02bec5 100644
--- a/src/emu/machine/laserdsc.c
+++ b/src/emu/machine/laserdsc.c
@@ -187,7 +187,7 @@ UINT32 laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm
// add the video texture
if (m_videoenable)
- screen.container().add_quad(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), m_videotex, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
+ screen.container().add_quad(0.0f, 0.0f, 1.0f, 1.0f, rgb_t(0xff,0xff,0xff,0xff), m_videotex, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
// add the overlay
if (m_overenable && overbitmap.valid())
@@ -196,7 +196,7 @@ UINT32 laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm
float y0 = 0.5f - 0.5f * m_overscaley + m_overposy;
float x1 = x0 + m_overscalex;
float y1 = y0 + m_overscaley;
- screen.container().add_quad(x0, y0, x1, y1, MAKE_ARGB(0xff,0xff,0xff,0xff), m_overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
+ screen.container().add_quad(x0, y0, x1, y1, rgb_t(0xff,0xff,0xff,0xff), m_overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
}
// swap to the next bitmap
@@ -773,7 +773,7 @@ void laserdisc_device::init_video()
if (m_videopalette == NULL)
throw emu_fatalerror("Out of memory allocating video palette");
for (int index = 0; index < 256; index++)
- m_videopalette->entry_set_color(index, MAKE_RGB(index, index, index));
+ m_videopalette->entry_set_color(index, rgb_t(index, index, index));
// allocate video frames
for (int index = 0; index < ARRAY_LENGTH(m_frame); index++)
diff --git a/src/emu/machine/s3c24xx.c b/src/emu/machine/s3c24xx.c
index 0354601399d..337087c47c2 100644
--- a/src/emu/machine/s3c24xx.c
+++ b/src/emu/machine/s3c24xx.c
@@ -183,7 +183,7 @@ static rgb_t s3c24xx_get_color_tft_16( device_t *device, UINT16 data)
g = (BITS( data, 10, 6) << 3);
b = (BITS( data, 5, 1) << 3);
i = BIT( data, 1) << 2;
- return MAKE_RGB( r | i, g | i, b | i);
+ return rgb_t( r | i, g | i, b | i);
}
else
{
@@ -191,7 +191,7 @@ static rgb_t s3c24xx_get_color_tft_16( device_t *device, UINT16 data)
r = BITS( data, 15, 11) << 3;
g = BITS( data, 10, 5) << 2;
b = BITS( data, 4, 0) << 3;
- return MAKE_RGB( r, g, b);
+ return rgb_t( r, g, b);
}
}
@@ -203,7 +203,7 @@ static rgb_t s3c24xx_get_color_tft_24( device_t *device, UINT32 data)
r = BITS( data, 23, 16);
g = BITS( data, 15, 8);
b = BITS( data, 7, 0);
- return MAKE_RGB( r, g, b);
+ return rgb_t( r, g, b);
}
#endif
@@ -214,7 +214,7 @@ static rgb_t s3c24xx_get_color_stn_12( device_t *device, UINT16 data)
r = BITS( data, 11, 8) << 4;
g = BITS( data, 7, 4) << 4;
b = BITS( data, 3, 0) << 4;
- return MAKE_RGB( r, g, b);
+ return rgb_t( r, g, b);
}
static rgb_t s3c24xx_get_color_stn_08( device_t *device, UINT8 data)
@@ -224,18 +224,18 @@ static rgb_t s3c24xx_get_color_stn_08( device_t *device, UINT8 data)
r = ((s3c24xx->lcd.regs.redlut >> (BITS( data, 7, 5) << 2)) & 0xF) << 4;
g = ((s3c24xx->lcd.regs.greenlut >> (BITS( data, 4, 2) << 2)) & 0xF) << 4;
b = ((s3c24xx->lcd.regs.bluelut >> (BITS( data, 1, 0) << 2)) & 0xF) << 4;
- return MAKE_RGB( r, g, b);
+ return rgb_t( r, g, b);
}
static rgb_t s3c24xx_get_color_stn_01( device_t *device, UINT8 data)
{
if ((data & 1) == 0)
{
- return RGB_BLACK;
+ return rgb_t::black;
}
else
{
- return RGB_WHITE;
+ return rgb_t::white;
}
}
@@ -244,14 +244,14 @@ static rgb_t s3c24xx_get_color_stn_02( device_t *device, UINT8 data)
s3c24xx_t *s3c24xx = get_token( device);
UINT8 r, g, b;
r = g = b = ((s3c24xx->lcd.regs.bluelut >> (BITS( data, 1, 0) << 2)) & 0xF) << 4;
- return MAKE_RGB( r, g, b);
+ return rgb_t( r, g, b);
}
static rgb_t s3c24xx_get_color_stn_04( device_t *device, UINT8 data)
{
UINT8 r, g, b;
r = g = b = BITS( data, 3, 0) << 4;
- return MAKE_RGB( r, g, b);
+ return rgb_t( r, g, b);
}
static rgb_t s3c24xx_get_color_tpal( device_t *device)
diff --git a/src/emu/render.c b/src/emu/render.c
index 717ef626c89..f946179f08f 100644
--- a/src/emu/render.c
+++ b/src/emu/render.c
@@ -575,10 +575,10 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
}
for (int index = 0; index < numentries; index++)
{
- UINT8 r = container.apply_brightness_contrast_gamma(RGB_RED(adjusted[index]));
- UINT8 g = container.apply_brightness_contrast_gamma(RGB_GREEN(adjusted[index]));
- UINT8 b = container.apply_brightness_contrast_gamma(RGB_BLUE(adjusted[index]));
- m_bcglookup[index] = MAKE_ARGB(RGB_ALPHA(adjusted[index]), r, g, b);
+ UINT8 r = container.apply_brightness_contrast_gamma(adjusted[index].r());
+ UINT8 g = container.apply_brightness_contrast_gamma(adjusted[index].g());
+ UINT8 b = container.apply_brightness_contrast_gamma(adjusted[index].b());
+ m_bcglookup[index] = rgb_t(adjusted[index].a(), r, g, b);
}
return m_bcglookup;
@@ -620,7 +620,7 @@ render_container::render_container(render_manager &manager, screen_device *scree
{
// all palette entries are opaque by default
for (int color = 0; color < ARRAY_LENGTH(m_bcglookup); color++)
- m_bcglookup[color] = MAKE_ARGB(0xff,0x00,0x00,0x00);
+ m_bcglookup[color] = rgb_t(0xff,0x00,0x00,0x00);
// make sure it is empty
empty();
@@ -823,10 +823,10 @@ render_container::item &render_container::add_generic(UINT8 type, float x0, floa
newitem->m_bounds.y0 = y0;
newitem->m_bounds.x1 = x1;
newitem->m_bounds.y1 = y1;
- newitem->m_color.r = (float)RGB_RED(argb) * (1.0f / 255.0f);
- newitem->m_color.g = (float)RGB_GREEN(argb) * (1.0f / 255.0f);
- newitem->m_color.b = (float)RGB_BLUE(argb) * (1.0f / 255.0f);
- newitem->m_color.a = (float)RGB_ALPHA(argb) * (1.0f / 255.0f);
+ newitem->m_color.r = (float)argb.r() * (1.0f / 255.0f);
+ newitem->m_color.g = (float)argb.g() * (1.0f / 255.0f);
+ newitem->m_color.b = (float)argb.b() * (1.0f / 255.0f);
+ newitem->m_color.a = (float)argb.a() * (1.0f / 255.0f);
newitem->m_flags = 0;
newitem->m_internal = 0;
newitem->m_width = 0;
@@ -858,16 +858,16 @@ void render_container::recompute_lookups()
if (m_palclient != NULL)
{
palette_t &palette = m_palclient->palette();
- const pen_t *adjusted_palette = palette.entry_list_adjusted();
+ const rgb_t *adjusted_palette = palette.entry_list_adjusted();
int colors = palette.num_colors() * palette.num_groups();
for (int i = 0; i < colors; i++)
{
- pen_t newval = adjusted_palette[i];
+ rgb_t newval = adjusted_palette[i];
m_bcglookup[i] = (newval & 0xff000000) |
- m_bcglookup256[0x200 + RGB_RED(newval)] |
- m_bcglookup256[0x100 + RGB_GREEN(newval)] |
- m_bcglookup256[0x000 + RGB_BLUE(newval)];
+ m_bcglookup256[0x200 + newval.r()] |
+ m_bcglookup256[0x100 + newval.g()] |
+ m_bcglookup256[0x000 + newval.b()];
}
}
}
@@ -892,7 +892,7 @@ void render_container::update_palette()
if (dirty != NULL)
{
palette_t &palette = m_palclient->palette();
- const pen_t *adjusted_palette = palette.entry_list_adjusted();
+ const rgb_t *adjusted_palette = palette.entry_list_adjusted();
// loop over chunks of 32 entries, since we can quickly examine 32 at a time
for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++)
@@ -907,9 +907,9 @@ void render_container::update_palette()
UINT32 finalentry = entry32 * 32 + entry;
rgb_t newval = adjusted_palette[finalentry];
m_bcglookup[finalentry] = (newval & 0xff000000) |
- m_bcglookup256[0x200 + RGB_RED(newval)] |
- m_bcglookup256[0x100 + RGB_GREEN(newval)] |
- m_bcglookup256[0x000 + RGB_BLUE(newval)];
+ m_bcglookup256[0x200 + newval.r()] |
+ m_bcglookup256[0x100 + newval.g()] |
+ m_bcglookup256[0x000 + newval.b()];
}
}
}
diff --git a/src/emu/rendersw.c b/src/emu/rendersw.c
index cf94f6318ba..6b5a3915a3d 100644
--- a/src/emu/rendersw.c
+++ b/src/emu/rendersw.c
@@ -31,7 +31,7 @@ private:
// internal helpers
static inline bool is_opaque(float alpha) { return (alpha >= (_NoDestRead ? 0.5f : 1.0f)); }
static inline bool is_transparent(float alpha) { return (alpha < (_NoDestRead ? 0.5f : 0.0001f)); }
- static inline rgb_t apply_intensity(int intensity, rgb_t color) { return MAKE_RGB((RGB_RED(color) * intensity) >> 8, (RGB_GREEN(color) * intensity) >> 8, (RGB_BLUE(color) * intensity) >> 8); }
+ static inline rgb_t apply_intensity(int intensity, rgb_t color) { return color * intensity; }
static inline float round_nearest(float f) { return floor(f + 0.5f); }
// destination pixels are written based on the values of the template parameters
@@ -119,7 +119,7 @@ private:
UINT32 b = (common + 516 * cb - 13696);
// Now clamp and shift back
- return MAKE_RGB(clamp16_shift8(r), clamp16_shift8(g), clamp16_shift8(b));
+ return rgb_t(clamp16_shift8(r), clamp16_shift8(g), clamp16_shift8(b));
}
@@ -359,7 +359,7 @@ private:
int y2 = int(prim.bounds.y1 * 65536.0f);
// handle color and intensity
- UINT32 col = MAKE_RGB(int(255.0f * prim.color.r * prim.color.a), int(255.0f * prim.color.g * prim.color.a), int(255.0f * prim.color.b * prim.color.a));
+ UINT32 col = rgb_t(int(255.0f * prim.color.r * prim.color.a), int(255.0f * prim.color.g * prim.color.a), int(255.0f * prim.color.b * prim.color.a));
if (PRIMFLAG_GET_ANTIALIAS(prim.flags))
{
diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c
index 0b2f869ba9a..6dbb46d050f 100644
--- a/src/emu/rendfont.c
+++ b/src/emu/rendfont.c
@@ -216,10 +216,10 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
// expand the four bits
if (dest != NULL)
{
- *dest++ = (bits & 8) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
- *dest++ = (bits & 4) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
- *dest++ = (bits & 2) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
- *dest++ = (bits & 1) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 8) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 4) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 2) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ *dest++ = (bits & 1) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
}
}
@@ -235,7 +235,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
if (accumbit == 7)
accum = *ptr++;
if (dest != NULL)
- *dest++ = (accum & (1 << accumbit)) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
+ *dest++ = (accum & (1 << accumbit)) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
accumbit = (accumbit - 1) & 7;
}
}
@@ -712,7 +712,7 @@ bool render_font::save_cached(const char *filename, UINT32 hash)
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)
+ if (src != NULL && rgb_t(src[x]).a() != 0)
accum |= 1 << accbit;
if (accbit-- == 0)
{
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index 80b5b501fb4..b9fd375835c 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -822,14 +822,14 @@ void layout_element::component::draw_rect(bitmap_argb32 &dest, const rectangle &
// if we're translucent, add in the destination pixel contribution
if (inva > 0)
{
- UINT32 dpix = dest.pix32(y, x);
- finalr += (RGB_RED(dpix) * inva) >> 8;
- finalg += (RGB_GREEN(dpix) * inva) >> 8;
- finalb += (RGB_BLUE(dpix) * inva) >> 8;
+ rgb_t dpix = dest.pix32(y, x);
+ finalr += (dpix.r() * inva) >> 8;
+ finalg += (dpix.g() * inva) >> 8;
+ finalb += (dpix.b() * inva) >> 8;
}
// store the target pixel, dividing the RGBA values by the overall scale factor
- dest.pix32(y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb);
+ dest.pix32(y, x) = rgb_t(finalr, finalg, finalb);
}
}
}
@@ -875,14 +875,14 @@ void layout_element::component::draw_disk(bitmap_argb32 &dest, const rectangle &
// if we're translucent, add in the destination pixel contribution
if (inva > 0)
{
- UINT32 dpix = dest.pix32(y, x);
- finalr += (RGB_RED(dpix) * inva) >> 8;
- finalg += (RGB_GREEN(dpix) * inva) >> 8;
- finalb += (RGB_BLUE(dpix) * inva) >> 8;
+ rgb_t dpix = dest.pix32(y, x);
+ finalr += (dpix.r() * inva) >> 8;
+ finalg += (dpix.g() * inva) >> 8;
+ finalb += (dpix.b() * inva) >> 8;
}
// store the target pixel, dividing the RGBA values by the overall scale factor
- dest.pix32(y, x) = MAKE_ARGB(0xff, finalr, finalg, finalb);
+ dest.pix32(y, x) = rgb_t(finalr, finalg, finalb);
}
}
}
@@ -958,15 +958,15 @@ void layout_element::component::draw_text(running_machine &machine, bitmap_argb3
int effx = curx + x + chbounds.min_x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = RGB_ALPHA(src[x]);
+ UINT32 spix = rgb_t(src[x]).a();
if (spix != 0)
{
- UINT32 dpix = d[effx];
+ rgb_t dpix = d[effx];
UINT32 ta = (a * (spix + 1)) >> 8;
- UINT32 tr = (r * ta + RGB_RED(dpix) * (0x100 - ta)) >> 8;
- UINT32 tg = (g * ta + RGB_GREEN(dpix) * (0x100 - ta)) >> 8;
- UINT32 tb = (b * ta + RGB_BLUE(dpix) * (0x100 - ta)) >> 8;
- d[effx] = MAKE_ARGB(0xff, tr, tg, tb);
+ UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
+ UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
+ UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
+ d[effx] = rgb_t(tr, tg, tb);
}
}
}
@@ -1072,7 +1072,7 @@ void layout_element::component::draw_reel(running_machine &machine, bitmap_argb3
int effx = x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = RGB_ALPHA(src[x]);
+ UINT32 spix = rgb_t(src[x]).a();
if (spix != 0)
{
d[effx] = src[x];
@@ -1110,15 +1110,15 @@ void layout_element::component::draw_reel(running_machine &machine, bitmap_argb3
int effx = curx + x + chbounds.min_x;
if (effx >= bounds.min_x && effx <= bounds.max_x)
{
- UINT32 spix = RGB_ALPHA(src[x]);
+ UINT32 spix = rgb_t(src[x]).a();
if (spix != 0)
{
- UINT32 dpix = d[effx];
+ rgb_t dpix = d[effx];
UINT32 ta = (a * (spix + 1)) >> 8;
- UINT32 tr = (r * ta + RGB_RED(dpix) * (0x100 - ta)) >> 8;
- UINT32 tg = (g * ta + RGB_GREEN(dpix) * (0x100 - ta)) >> 8;
- UINT32 tb = (b * ta + RGB_BLUE(dpix) * (0x100 - ta)) >> 8;
- d[effx] = MAKE_ARGB(0xff, tr, tg, tb);
+ UINT32 tr = (r * ta + dpix.r() * (0x100 - ta)) >> 8;
+ UINT32 tg = (g * ta + dpix.g() * (0x100 - ta)) >> 8;
+ UINT32 tb = (b * ta + dpix.b() * (0x100 - ta)) >> 8;
+ d[effx] = rgb_t(tr, tg, tb);
}
}
}
@@ -1166,7 +1166,7 @@ void layout_element::component::load_bitmap()
m_bitmap[0].fill(0);
for (int step = 0; step < 100; step += 25)
for (int line = 0; line < 100; line++)
- m_bitmap[0].pix32((step + line) % 100, line % 100) = MAKE_ARGB(0xff,0xff,0xff,0xff);
+ m_bitmap[0].pix32((step + line) % 100, line % 100) = rgb_t(0xff,0xff,0xff,0xff);
// log an error
if (!m_alphafile[0])
@@ -1205,8 +1205,8 @@ void layout_element::component::load_reel_bitmap(int number)
void layout_element::component::draw_led7seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
{
- const rgb_t onpen = MAKE_ARGB(0xff,0xff,0xff,0xff);
- const rgb_t offpen = MAKE_ARGB(0xff,0x20,0x20,0x20);
+ const rgb_t onpen = rgb_t(0xff,0xff,0xff,0xff);
+ const rgb_t offpen = rgb_t(0xff,0x20,0x20,0x20);
// sizes for computation
int bmwidth = 250;
@@ -1216,7 +1216,7 @@ void layout_element::component::draw_led7seg(bitmap_argb32 &dest, const rectangl
// allocate a temporary bitmap for drawing
bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
- tempbitmap.fill(MAKE_ARGB(0xff,0x00,0x00,0x00));
+ tempbitmap.fill(rgb_t(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);
@@ -1256,8 +1256,8 @@ void layout_element::component::draw_led7seg(bitmap_argb32 &dest, const rectangl
void layout_element::component::draw_led14seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
{
- const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
- const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
+ const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
+ const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
// sizes for computation
int bmwidth = 250;
@@ -1267,7 +1267,7 @@ void layout_element::component::draw_led14seg(bitmap_argb32 &dest, const rectang
// allocate a temporary bitmap for drawing
bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
- tempbitmap.fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
// top bar
draw_segment_horizontal(tempbitmap,
@@ -1358,8 +1358,8 @@ void layout_element::component::draw_led14seg(bitmap_argb32 &dest, const rectang
void layout_element::component::draw_led14segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
{
- const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
- const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
+ const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
+ const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
// sizes for computation
int bmwidth = 250;
@@ -1369,7 +1369,7 @@ void layout_element::component::draw_led14segsc(bitmap_argb32 &dest, const recta
// allocate a temporary bitmap for drawing, adding some extra space for the tail
bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight + segwidth);
- tempbitmap.fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
// top bar
draw_segment_horizontal(tempbitmap,
@@ -1468,8 +1468,8 @@ void layout_element::component::draw_led14segsc(bitmap_argb32 &dest, const recta
void layout_element::component::draw_led16seg(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
{
- const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
- const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
+ const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
+ const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
// sizes for computation
int bmwidth = 250;
@@ -1479,7 +1479,7 @@ void layout_element::component::draw_led16seg(bitmap_argb32 &dest, const rectang
// allocate a temporary bitmap for drawing
bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight);
- tempbitmap.fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
// top-left bar
draw_segment_horizontal_caps(tempbitmap,
@@ -1580,8 +1580,8 @@ void layout_element::component::draw_led16seg(bitmap_argb32 &dest, const rectang
void layout_element::component::draw_led16segsc(bitmap_argb32 &dest, const rectangle &bounds, int pattern)
{
- const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
- const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
+ const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
+ const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
// sizes for computation
int bmwidth = 250;
@@ -1591,7 +1591,7 @@ void layout_element::component::draw_led16segsc(bitmap_argb32 &dest, const recta
// allocate a temporary bitmap for drawing
bitmap_argb32 tempbitmap(bmwidth + skewwidth, bmheight + segwidth);
- tempbitmap.fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
// top-left bar
draw_segment_horizontal_caps(tempbitmap,
@@ -1701,8 +1701,8 @@ void layout_element::component::draw_led16segsc(bitmap_argb32 &dest, const recta
void layout_element::component::draw_dotmatrix(int dots, bitmap_argb32 &dest, const rectangle &bounds, int pattern)
{
- const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
- const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
+ const rgb_t onpen = rgb_t(0xff, 0xff, 0xff, 0xff);
+ const rgb_t offpen = rgb_t(0xff, 0x20, 0x20, 0x20);
// sizes for computation
int bmheight = 300;
@@ -1710,7 +1710,7 @@ void layout_element::component::draw_dotmatrix(int dots, bitmap_argb32 &dest, co
// allocate a temporary bitmap for drawing
bitmap_argb32 tempbitmap(dotwidth*dots, bmheight);
- tempbitmap.fill(MAKE_ARGB(0xff, 0x00, 0x00, 0x00));
+ tempbitmap.fill(rgb_t(0xff, 0x00, 0x00, 0x00));
for (int i = 0; i < dots; i++)
draw_segment_decimal(tempbitmap, ((dotwidth/2 )+ (i * dotwidth)), bmheight/2, dotwidth, (pattern & (1 << i))?onpen:offpen);
diff --git a/src/emu/rendutil.c b/src/emu/rendutil.c
index 86e3f7abc06..34b783ee90e 100644
--- a/src/emu/rendutil.c
+++ b/src/emu/rendutil.c
@@ -29,22 +29,6 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
/***************************************************************************
- INLINE FUNCTIONS
-***************************************************************************/
-
-/*-------------------------------------------------
- compute_brightness - compute the effective
- brightness for an RGB pixel
--------------------------------------------------*/
-
-INLINE UINT8 compute_brightness(rgb_t rgb)
-{
- return (RGB_RED(rgb) * 222 + RGB_GREEN(rgb) * 707 + RGB_BLUE(rgb) * 71) / 1000;
-}
-
-
-
-/***************************************************************************
RENDER UTILITIES
***************************************************************************/
@@ -125,7 +109,6 @@ static void resample_argb_bitmap_average(UINT32 *dest, UINT32 drowpixels, UINT32
for (curx = startx; xremaining; curx += xchunk)
{
UINT32 factor;
- UINT32 pix;
/* determine the X contribution, clamping to the amount remaining */
xchunk = 0x1000 - (curx & 0xfff);
@@ -137,13 +120,13 @@ static void resample_argb_bitmap_average(UINT32 *dest, UINT32 drowpixels, UINT32
factor = xchunk * ychunk;
/* fetch the source pixel */
- pix = source[(cury >> 12) * srowpixels + (curx >> 12)];
+ rgb_t pix = source[(cury >> 12) * srowpixels + (curx >> 12)];
/* accumulate the RGBA values */
- sumr += factor * RGB_RED(pix);
- sumg += factor * RGB_GREEN(pix);
- sumb += factor * RGB_BLUE(pix);
- suma += factor * RGB_ALPHA(pix);
+ sumr += factor * pix.r();
+ sumg += factor * pix.g();
+ sumb += factor * pix.b();
+ suma += factor * pix.a();
}
}
@@ -156,15 +139,15 @@ static void resample_argb_bitmap_average(UINT32 *dest, UINT32 drowpixels, UINT32
/* if we're translucent, add in the destination pixel contribution */
if (a < 256)
{
- UINT32 dpix = dest[y * drowpixels + x];
- suma += RGB_ALPHA(dpix) * (256 - a);
- sumr += RGB_RED(dpix) * (256 - a);
- sumg += RGB_GREEN(dpix) * (256 - a);
- sumb += RGB_BLUE(dpix) * (256 - a);
+ rgb_t dpix = dest[y * drowpixels + x];
+ suma += dpix.a() * (256 - a);
+ sumr += dpix.r() * (256 - a);
+ sumg += dpix.g() * (256 - a);
+ sumb += dpix.b() * (256 - a);
}
/* store the target pixel, dividing the RGBA values by the overall scale factor */
- dest[y * drowpixels + x] = MAKE_ARGB(suma, sumr, sumg, sumb);
+ dest[y * drowpixels + x] = rgb_t(suma, sumr, sumg, sumb);
}
}
}
@@ -196,7 +179,7 @@ static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT3
for (x = 0; x < dwidth; x++)
{
UINT32 startx = x * dx;
- UINT32 pix0, pix1, pix2, pix3;
+ rgb_t pix0, pix1, pix2, pix3;
UINT32 sumr, sumg, sumb, suma;
UINT32 nextx, nexty;
UINT32 curx, cury;
@@ -228,31 +211,31 @@ static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT3
/* contributions from pixel 0 (top,left) */
factor = (0x1000 - curx) * (0x1000 - cury);
- sumr = factor * RGB_RED(pix0);
- sumg = factor * RGB_GREEN(pix0);
- sumb = factor * RGB_BLUE(pix0);
- suma = factor * RGB_ALPHA(pix0);
+ sumr = factor * pix0.r();
+ sumg = factor * pix0.g();
+ sumb = factor * pix0.b();
+ suma = factor * pix0.a();
/* contributions from pixel 1 (top,right) */
factor = curx * (0x1000 - cury);
- sumr += factor * RGB_RED(pix1);
- sumg += factor * RGB_GREEN(pix1);
- sumb += factor * RGB_BLUE(pix1);
- suma += factor * RGB_ALPHA(pix1);
+ sumr += factor * pix1.r();
+ sumg += factor * pix1.g();
+ sumb += factor * pix1.b();
+ suma += factor * pix1.a();
/* contributions from pixel 2 (bottom,left) */
factor = (0x1000 - curx) * cury;
- sumr += factor * RGB_RED(pix2);
- sumg += factor * RGB_GREEN(pix2);
- sumb += factor * RGB_BLUE(pix2);
- suma += factor * RGB_ALPHA(pix2);
+ sumr += factor * pix2.r();
+ sumg += factor * pix2.g();
+ sumb += factor * pix2.b();
+ suma += factor * pix2.a();
/* contributions from pixel 3 (bottom,right) */
factor = curx * cury;
- sumr += factor * RGB_RED(pix3);
- sumg += factor * RGB_GREEN(pix3);
- sumb += factor * RGB_BLUE(pix3);
- suma += factor * RGB_ALPHA(pix3);
+ sumr += factor * pix3.r();
+ sumg += factor * pix3.g();
+ sumb += factor * pix3.b();
+ suma += factor * pix3.a();
/* apply scaling */
suma = (suma >> 24) * a / 256;
@@ -263,15 +246,15 @@ static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT3
/* if we're translucent, add in the destination pixel contribution */
if (a < 256)
{
- UINT32 dpix = dest[y * drowpixels + x];
- suma += RGB_ALPHA(dpix) * (256 - a);
- sumr += RGB_RED(dpix) * (256 - a);
- sumg += RGB_GREEN(dpix) * (256 - a);
- sumb += RGB_BLUE(dpix) * (256 - a);
+ rgb_t dpix = dest[y * drowpixels + x];
+ suma += dpix.a() * (256 - a);
+ sumr += dpix.r() * (256 - a);
+ sumg += dpix.g() * (256 - a);
+ sumb += dpix.b() * (256 - a);
}
/* store the target pixel, dividing the RGBA values by the overall scale factor */
- dest[y * drowpixels + x] = MAKE_ARGB(suma, sumr, sumg, sumb);
+ dest[y * drowpixels + x] = rgb_t(suma, sumr, sumg, sumb);
}
}
}
@@ -633,7 +616,7 @@ static bool copy_png_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
/* determine alpha and expand to 32bpp */
UINT8 alpha = (*src < png->num_trans) ? png->trans[*src] : 0xff;
accumalpha &= alpha;
- bitmap.pix32(y, x) = MAKE_ARGB(alpha, png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]);
+ bitmap.pix32(y, x) = rgb_t(alpha, png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]);
}
}
@@ -644,7 +627,7 @@ static bool copy_png_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
src = png->image;
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src++)
- bitmap.pix32(y, x) = MAKE_ARGB(0xff, *src, *src, *src);
+ bitmap.pix32(y, x) = rgb_t(0xff, *src, *src, *src);
}
/* handle 32bpp non-alpha case */
@@ -654,7 +637,7 @@ static bool copy_png_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
src = png->image;
for (y = 0; y < png->height; y++)
for (x = 0; x < png->width; x++, src += 3)
- bitmap.pix32(y, x) = MAKE_ARGB(0xff, src[0], src[1], src[2]);
+ bitmap.pix32(y, x) = rgb_t(0xff, src[0], src[1], src[2]);
}
/* handle 32bpp alpha case */
@@ -666,7 +649,7 @@ static bool copy_png_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
for (x = 0; x < png->width; x++, src += 4)
{
accumalpha &= src[3];
- bitmap.pix32(y, x) = MAKE_ARGB(src[3], src[0], src[1], src[2]);
+ bitmap.pix32(y, x) = rgb_t(src[3], src[0], src[1], src[2]);
}
}
@@ -695,9 +678,9 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
for (x = 0; x < png->width; x++, src++)
{
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]));
+ UINT8 alpha = rgb_t(png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]).brightness();
accumalpha &= alpha;
- bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = rgb_t(alpha, pixel.r(), pixel.g(), pixel.b());
}
}
@@ -711,7 +694,7 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
{
rgb_t pixel = bitmap.pix32(y, x);
accumalpha &= *src;
- bitmap.pix32(y, x) = MAKE_ARGB(*src, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = rgb_t(*src, pixel.r(), pixel.g(), pixel.b());
}
}
@@ -724,9 +707,9 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
for (x = 0; x < png->width; x++, src += 3)
{
rgb_t pixel = bitmap.pix32(y, x);
- UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
+ UINT8 alpha = rgb_t(src[0], src[1], src[2]).brightness();
accumalpha &= alpha;
- bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = rgb_t(alpha, pixel.r(), pixel.g(), pixel.b());
}
}
@@ -739,9 +722,9 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png)
for (x = 0; x < png->width; x++, src += 4)
{
rgb_t pixel = bitmap.pix32(y, x);
- UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
+ UINT8 alpha = rgb_t(src[0], src[1], src[2]).brightness();
accumalpha &= alpha;
- bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
+ bitmap.pix32(y, x) = rgb_t(alpha, pixel.r(), pixel.g(), pixel.b());
}
}
diff --git a/src/emu/save.h b/src/emu/save.h
index 39d742571e2..7841449a6e8 100644
--- a/src/emu/save.h
+++ b/src/emu/save.h
@@ -210,6 +210,7 @@ ALLOW_SAVE_TYPE(PAIR64);
ALLOW_SAVE_TYPE(float);
ALLOW_SAVE_TYPE(double);
ALLOW_SAVE_TYPE(endianness_t);
+ALLOW_SAVE_TYPE(rgb_t);
diff --git a/src/emu/screen.c b/src/emu/screen.c
index d8cd3e5c9ac..4acde133dab 100644
--- a/src/emu/screen.c
+++ b/src/emu/screen.c
@@ -833,7 +833,7 @@ bool screen_device::update_quads()
// create an empty container with a single quad
m_container->empty();
- m_container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), m_texture[m_curtexture], PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
+ m_container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, rgb_t(0xff,0xff,0xff,0xff), m_texture[m_curtexture], PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
}
}
@@ -884,7 +884,7 @@ void screen_device::update_burnin()
for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep)
{
rgb_t pixel = palette[src[srcx >> 16]];
- dst[x] += RGB_GREEN(pixel) + RGB_RED(pixel) + RGB_BLUE(pixel);
+ dst[x] += pixel.g() + pixel.r() + pixel.b();
}
}
break;
@@ -901,7 +901,7 @@ void screen_device::update_burnin()
for (x = 0, srcx = xstart; x < dstwidth; x++, srcx += xstep)
{
rgb_t pixel = src[srcx >> 16];
- dst[x] += RGB_GREEN(pixel) + RGB_RED(pixel) + RGB_BLUE(pixel);
+ dst[x] += pixel.g() + pixel.r() + pixel.b();
}
}
break;
@@ -959,7 +959,7 @@ void screen_device::finalize_burnin()
for (int x = 0, srcx = 0; x < dstwidth; x++, srcx += xstep)
{
int brightness = (UINT64)(maxval - src[srcx >> 16]) * 255 / (maxval - minval);
- dst[x] = MAKE_ARGB(0xff, brightness, brightness, brightness);
+ dst[x] = rgb_t(0xff, brightness, brightness, brightness);
}
}
diff --git a/src/emu/sound/cdp1864.c b/src/emu/sound/cdp1864.c
index 5a4d8cafafd..0c12b01f554 100644
--- a/src/emu/sound/cdp1864.c
+++ b/src/emu/sound/cdp1864.c
@@ -417,7 +417,7 @@ UINT32 cdp1864_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
}
else
{
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::black, cliprect);
}
return 0;
@@ -456,7 +456,7 @@ void cdp1864_device::initialize_palette()
if (m_chr_b != RES_INF) b = combine_1_weights(color_weights_b, BIT(i, 1));
if (m_chr_g != RES_INF) g = combine_1_weights(color_weights_g, BIT(i, 2));
- m_palette[i] = MAKE_RGB(r, g, b);
+ m_palette[i] = rgb_t(r, g, b);
// background colors
r = 0, g = 0, b = 0;
@@ -465,6 +465,6 @@ void cdp1864_device::initialize_palette()
if (m_chr_b != RES_INF) b = combine_1_weights(color_weights_bkg_b, BIT(i, 1));
if (m_chr_g != RES_INF) g = combine_1_weights(color_weights_bkg_g, BIT(i, 2));
- m_palette[i + 8] = MAKE_RGB(r, g, b);
+ m_palette[i + 8] = rgb_t(r, g, b);
}
}
diff --git a/src/emu/sound/cdp1869.c b/src/emu/sound/cdp1869.c
index d5aa7bfb55a..8ef42e7d5b9 100644
--- a/src/emu/sound/cdp1869.c
+++ b/src/emu/sound/cdp1869.c
@@ -234,7 +234,7 @@ inline rgb_t cdp1869_device::get_rgb(int i, int c, int l)
g = (c & 1) ? luma : 0;
b = (c & 2) ? luma : 0;
- return MAKE_RGB(r, g, b);
+ return rgb_t(r, g, b);
}
diff --git a/src/emu/sound/mos6560.c b/src/emu/sound/mos6560.c
index 003ebef3bc6..e54e0ce2942 100644
--- a/src/emu/sound/mos6560.c
+++ b/src/emu/sound/mos6560.c
@@ -126,25 +126,25 @@
// VICE palette
static const rgb_t PALETTE[] =
{
- MAKE_RGB(0x00, 0x00, 0x00),
- MAKE_RGB(0xff, 0xff, 0xff),
- MAKE_RGB(0xf0, 0x00, 0x00),
- MAKE_RGB(0x00, 0xf0, 0xf0),
-
- MAKE_RGB(0x60, 0x00, 0x60),
- MAKE_RGB(0x00, 0xa0, 0x00),
- MAKE_RGB(0x00, 0x00, 0xf0),
- MAKE_RGB(0xd0, 0xd0, 0x00),
-
- MAKE_RGB(0xc0, 0xa0, 0x00),
- MAKE_RGB(0xff, 0xa0, 0x00),
- MAKE_RGB(0xf0, 0x80, 0x80),
- MAKE_RGB(0x00, 0xff, 0xff),
-
- MAKE_RGB(0xff, 0x00, 0xff),
- MAKE_RGB(0x00, 0xff, 0x00),
- MAKE_RGB(0x00, 0xa0, 0xff),
- MAKE_RGB(0xff, 0xff, 0x00)
+ rgb_t(0x00, 0x00, 0x00),
+ rgb_t(0xff, 0xff, 0xff),
+ rgb_t(0xf0, 0x00, 0x00),
+ rgb_t(0x00, 0xf0, 0xf0),
+
+ rgb_t(0x60, 0x00, 0x60),
+ rgb_t(0x00, 0xa0, 0x00),
+ rgb_t(0x00, 0x00, 0xf0),
+ rgb_t(0xd0, 0xd0, 0x00),
+
+ rgb_t(0xc0, 0xa0, 0x00),
+ rgb_t(0xff, 0xa0, 0x00),
+ rgb_t(0xf0, 0x80, 0x80),
+ rgb_t(0x00, 0xff, 0xff),
+
+ rgb_t(0xff, 0x00, 0xff),
+ rgb_t(0x00, 0xff, 0x00),
+ rgb_t(0x00, 0xa0, 0xff),
+ rgb_t(0xff, 0xff, 0x00)
};
diff --git a/src/emu/sound/mos7360.c b/src/emu/sound/mos7360.c
index 51614edf0ca..a6fc755f571 100644
--- a/src/emu/sound/mos7360.c
+++ b/src/emu/sound/mos7360.c
@@ -92,45 +92,45 @@ static const rgb_t PALETTE[] =
/* light violett, light green, light blue, light yellow */
/* these 16 colors are 8 times here in different luminance (dark..light) */
/* taken from digitized tv screenshot */
- MAKE_RGB(0x06, 0x01, 0x03), MAKE_RGB(0x2b, 0x2b, 0x2b), MAKE_RGB(0x67, 0x0e, 0x0f), MAKE_RGB(0x00, 0x3f, 0x42),
- MAKE_RGB(0x57, 0x00, 0x6d), MAKE_RGB(0x00, 0x4e, 0x00), MAKE_RGB(0x19, 0x1c, 0x94), MAKE_RGB(0x38, 0x38, 0x00),
- MAKE_RGB(0x56, 0x20, 0x00), MAKE_RGB(0x4b, 0x28, 0x00), MAKE_RGB(0x16, 0x48, 0x00), MAKE_RGB(0x69, 0x07, 0x2f),
- MAKE_RGB(0x00, 0x46, 0x26), MAKE_RGB(0x06, 0x2a, 0x80), MAKE_RGB(0x2a, 0x14, 0x9b), MAKE_RGB(0x0b, 0x49, 0x00),
-
- MAKE_RGB(0x00, 0x03, 0x02), MAKE_RGB(0x3d, 0x3d, 0x3d), MAKE_RGB(0x75, 0x1e, 0x20), MAKE_RGB(0x00, 0x50, 0x4f),
- MAKE_RGB(0x6a, 0x10, 0x78), MAKE_RGB(0x04, 0x5c, 0x00), MAKE_RGB(0x2a, 0x2a, 0xa3), MAKE_RGB(0x4c, 0x47, 0x00),
- MAKE_RGB(0x69, 0x2f, 0x00), MAKE_RGB(0x59, 0x38, 0x00), MAKE_RGB(0x26, 0x56, 0x00), MAKE_RGB(0x75, 0x15, 0x41),
- MAKE_RGB(0x00, 0x58, 0x3d), MAKE_RGB(0x15, 0x3d, 0x8f), MAKE_RGB(0x39, 0x22, 0xae), MAKE_RGB(0x19, 0x59, 0x00),
-
- MAKE_RGB(0x00, 0x03, 0x04), MAKE_RGB(0x42, 0x42, 0x42), MAKE_RGB(0x7b, 0x28, 0x20), MAKE_RGB(0x02, 0x56, 0x59),
- MAKE_RGB(0x6f, 0x1a, 0x82), MAKE_RGB(0x0a, 0x65, 0x09), MAKE_RGB(0x30, 0x34, 0xa7), MAKE_RGB(0x50, 0x51, 0x00),
- MAKE_RGB(0x6e, 0x36, 0x00), MAKE_RGB(0x65, 0x40, 0x00), MAKE_RGB(0x2c, 0x5c, 0x00), MAKE_RGB(0x7d, 0x1e, 0x45),
- MAKE_RGB(0x01, 0x61, 0x45), MAKE_RGB(0x1c, 0x45, 0x99), MAKE_RGB(0x42, 0x2d, 0xad), MAKE_RGB(0x1d, 0x62, 0x00),
-
- MAKE_RGB(0x05, 0x00, 0x02), MAKE_RGB(0x56, 0x55, 0x5a), MAKE_RGB(0x90, 0x3c, 0x3b), MAKE_RGB(0x17, 0x6d, 0x72),
- MAKE_RGB(0x87, 0x2d, 0x99), MAKE_RGB(0x1f, 0x7b, 0x15), MAKE_RGB(0x46, 0x49, 0xc1), MAKE_RGB(0x66, 0x63, 0x00),
- MAKE_RGB(0x84, 0x4c, 0x0d), MAKE_RGB(0x73, 0x55, 0x00), MAKE_RGB(0x40, 0x72, 0x00), MAKE_RGB(0x91, 0x33, 0x5e),
- MAKE_RGB(0x19, 0x74, 0x5c), MAKE_RGB(0x32, 0x59, 0xae), MAKE_RGB(0x59, 0x3f, 0xc3), MAKE_RGB(0x32, 0x76, 0x00),
-
- MAKE_RGB(0x02, 0x01, 0x06), MAKE_RGB(0x84, 0x7e, 0x85), MAKE_RGB(0xbb, 0x67, 0x68), MAKE_RGB(0x45, 0x96, 0x96),
- MAKE_RGB(0xaf, 0x58, 0xc3), MAKE_RGB(0x4a, 0xa7, 0x3e), MAKE_RGB(0x73, 0x73, 0xec), MAKE_RGB(0x92, 0x8d, 0x11),
- MAKE_RGB(0xaf, 0x78, 0x32), MAKE_RGB(0xa1, 0x80, 0x20), MAKE_RGB(0x6c, 0x9e, 0x12), MAKE_RGB(0xba, 0x5f, 0x89),
- MAKE_RGB(0x46, 0x9f, 0x83), MAKE_RGB(0x61, 0x85, 0xdd), MAKE_RGB(0x84, 0x6c, 0xef), MAKE_RGB(0x5d, 0xa3, 0x29),
-
- MAKE_RGB(0x02, 0x00, 0x0a), MAKE_RGB(0xb2, 0xac, 0xb3), MAKE_RGB(0xe9, 0x92, 0x92), MAKE_RGB(0x6c, 0xc3, 0xc1),
- MAKE_RGB(0xd9, 0x86, 0xf0), MAKE_RGB(0x79, 0xd1, 0x76), MAKE_RGB(0x9d, 0xa1, 0xff), MAKE_RGB(0xbd, 0xbe, 0x40),
- MAKE_RGB(0xdc, 0xa2, 0x61), MAKE_RGB(0xd1, 0xa9, 0x4c), MAKE_RGB(0x93, 0xc8, 0x3d), MAKE_RGB(0xe9, 0x8a, 0xb1),
- MAKE_RGB(0x6f, 0xcd, 0xab), MAKE_RGB(0x8a, 0xb4, 0xff), MAKE_RGB(0xb2, 0x9a, 0xff), MAKE_RGB(0x88, 0xcb, 0x59),
-
- MAKE_RGB(0x02, 0x00, 0x0a), MAKE_RGB(0xc7, 0xca, 0xc9), MAKE_RGB(0xff, 0xac, 0xac), MAKE_RGB(0x85, 0xd8, 0xe0),
- MAKE_RGB(0xf3, 0x9c, 0xff), MAKE_RGB(0x92, 0xea, 0x8a), MAKE_RGB(0xb7, 0xba, 0xff), MAKE_RGB(0xd6, 0xd3, 0x5b),
- MAKE_RGB(0xf3, 0xbe, 0x79), MAKE_RGB(0xe6, 0xc5, 0x65), MAKE_RGB(0xb0, 0xe0, 0x57), MAKE_RGB(0xff, 0xa4, 0xcf),
- MAKE_RGB(0x89, 0xe5, 0xc8), MAKE_RGB(0xa4, 0xca, 0xff), MAKE_RGB(0xca, 0xb3, 0xff), MAKE_RGB(0xa2, 0xe5, 0x7a),
-
- MAKE_RGB(0x01, 0x01, 0x01), MAKE_RGB(0xff, 0xff, 0xff), MAKE_RGB(0xff, 0xf6, 0xf2), MAKE_RGB(0xd1, 0xff, 0xff),
- MAKE_RGB(0xff, 0xe9, 0xff), MAKE_RGB(0xdb, 0xff, 0xd3), MAKE_RGB(0xfd, 0xff, 0xff), MAKE_RGB(0xff, 0xff, 0xa3),
- MAKE_RGB(0xff, 0xff, 0xc1), MAKE_RGB(0xff, 0xff, 0xb2), MAKE_RGB(0xfc, 0xff, 0xa2), MAKE_RGB(0xff, 0xee, 0xff),
- MAKE_RGB(0xd1, 0xff, 0xff), MAKE_RGB(0xeb, 0xff, 0xff), MAKE_RGB(0xff, 0xf8, 0xff), MAKE_RGB(0xed, 0xff, 0xbc)
+ rgb_t(0x06, 0x01, 0x03), rgb_t(0x2b, 0x2b, 0x2b), rgb_t(0x67, 0x0e, 0x0f), rgb_t(0x00, 0x3f, 0x42),
+ rgb_t(0x57, 0x00, 0x6d), rgb_t(0x00, 0x4e, 0x00), rgb_t(0x19, 0x1c, 0x94), rgb_t(0x38, 0x38, 0x00),
+ rgb_t(0x56, 0x20, 0x00), rgb_t(0x4b, 0x28, 0x00), rgb_t(0x16, 0x48, 0x00), rgb_t(0x69, 0x07, 0x2f),
+ rgb_t(0x00, 0x46, 0x26), rgb_t(0x06, 0x2a, 0x80), rgb_t(0x2a, 0x14, 0x9b), rgb_t(0x0b, 0x49, 0x00),
+
+ rgb_t(0x00, 0x03, 0x02), rgb_t(0x3d, 0x3d, 0x3d), rgb_t(0x75, 0x1e, 0x20), rgb_t(0x00, 0x50, 0x4f),
+ rgb_t(0x6a, 0x10, 0x78), rgb_t(0x04, 0x5c, 0x00), rgb_t(0x2a, 0x2a, 0xa3), rgb_t(0x4c, 0x47, 0x00),
+ rgb_t(0x69, 0x2f, 0x00), rgb_t(0x59, 0x38, 0x00), rgb_t(0x26, 0x56, 0x00), rgb_t(0x75, 0x15, 0x41),
+ rgb_t(0x00, 0x58, 0x3d), rgb_t(0x15, 0x3d, 0x8f), rgb_t(0x39, 0x22, 0xae), rgb_t(0x19, 0x59, 0x00),
+
+ rgb_t(0x00, 0x03, 0x04), rgb_t(0x42, 0x42, 0x42), rgb_t(0x7b, 0x28, 0x20), rgb_t(0x02, 0x56, 0x59),
+ rgb_t(0x6f, 0x1a, 0x82), rgb_t(0x0a, 0x65, 0x09), rgb_t(0x30, 0x34, 0xa7), rgb_t(0x50, 0x51, 0x00),
+ rgb_t(0x6e, 0x36, 0x00), rgb_t(0x65, 0x40, 0x00), rgb_t(0x2c, 0x5c, 0x00), rgb_t(0x7d, 0x1e, 0x45),
+ rgb_t(0x01, 0x61, 0x45), rgb_t(0x1c, 0x45, 0x99), rgb_t(0x42, 0x2d, 0xad), rgb_t(0x1d, 0x62, 0x00),
+
+ rgb_t(0x05, 0x00, 0x02), rgb_t(0x56, 0x55, 0x5a), rgb_t(0x90, 0x3c, 0x3b), rgb_t(0x17, 0x6d, 0x72),
+ rgb_t(0x87, 0x2d, 0x99), rgb_t(0x1f, 0x7b, 0x15), rgb_t(0x46, 0x49, 0xc1), rgb_t(0x66, 0x63, 0x00),
+ rgb_t(0x84, 0x4c, 0x0d), rgb_t(0x73, 0x55, 0x00), rgb_t(0x40, 0x72, 0x00), rgb_t(0x91, 0x33, 0x5e),
+ rgb_t(0x19, 0x74, 0x5c), rgb_t(0x32, 0x59, 0xae), rgb_t(0x59, 0x3f, 0xc3), rgb_t(0x32, 0x76, 0x00),
+
+ rgb_t(0x02, 0x01, 0x06), rgb_t(0x84, 0x7e, 0x85), rgb_t(0xbb, 0x67, 0x68), rgb_t(0x45, 0x96, 0x96),
+ rgb_t(0xaf, 0x58, 0xc3), rgb_t(0x4a, 0xa7, 0x3e), rgb_t(0x73, 0x73, 0xec), rgb_t(0x92, 0x8d, 0x11),
+ rgb_t(0xaf, 0x78, 0x32), rgb_t(0xa1, 0x80, 0x20), rgb_t(0x6c, 0x9e, 0x12), rgb_t(0xba, 0x5f, 0x89),
+ rgb_t(0x46, 0x9f, 0x83), rgb_t(0x61, 0x85, 0xdd), rgb_t(0x84, 0x6c, 0xef), rgb_t(0x5d, 0xa3, 0x29),
+
+ rgb_t(0x02, 0x00, 0x0a), rgb_t(0xb2, 0xac, 0xb3), rgb_t(0xe9, 0x92, 0x92), rgb_t(0x6c, 0xc3, 0xc1),
+ rgb_t(0xd9, 0x86, 0xf0), rgb_t(0x79, 0xd1, 0x76), rgb_t(0x9d, 0xa1, 0xff), rgb_t(0xbd, 0xbe, 0x40),
+ rgb_t(0xdc, 0xa2, 0x61), rgb_t(0xd1, 0xa9, 0x4c), rgb_t(0x93, 0xc8, 0x3d), rgb_t(0xe9, 0x8a, 0xb1),
+ rgb_t(0x6f, 0xcd, 0xab), rgb_t(0x8a, 0xb4, 0xff), rgb_t(0xb2, 0x9a, 0xff), rgb_t(0x88, 0xcb, 0x59),
+
+ rgb_t(0x02, 0x00, 0x0a), rgb_t(0xc7, 0xca, 0xc9), rgb_t(0xff, 0xac, 0xac), rgb_t(0x85, 0xd8, 0xe0),
+ rgb_t(0xf3, 0x9c, 0xff), rgb_t(0x92, 0xea, 0x8a), rgb_t(0xb7, 0xba, 0xff), rgb_t(0xd6, 0xd3, 0x5b),
+ rgb_t(0xf3, 0xbe, 0x79), rgb_t(0xe6, 0xc5, 0x65), rgb_t(0xb0, 0xe0, 0x57), rgb_t(0xff, 0xa4, 0xcf),
+ rgb_t(0x89, 0xe5, 0xc8), rgb_t(0xa4, 0xca, 0xff), rgb_t(0xca, 0xb3, 0xff), rgb_t(0xa2, 0xe5, 0x7a),
+
+ rgb_t(0x01, 0x01, 0x01), rgb_t(0xff, 0xff, 0xff), rgb_t(0xff, 0xf6, 0xf2), rgb_t(0xd1, 0xff, 0xff),
+ rgb_t(0xff, 0xe9, 0xff), rgb_t(0xdb, 0xff, 0xd3), rgb_t(0xfd, 0xff, 0xff), rgb_t(0xff, 0xff, 0xa3),
+ rgb_t(0xff, 0xff, 0xc1), rgb_t(0xff, 0xff, 0xb2), rgb_t(0xfc, 0xff, 0xa2), rgb_t(0xff, 0xee, 0xff),
+ rgb_t(0xd1, 0xff, 0xff), rgb_t(0xeb, 0xff, 0xff), rgb_t(0xff, 0xf8, 0xff), rgb_t(0xed, 0xff, 0xbc)
};
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c
index 42f8e9062f8..daf44cc1f83 100644
--- a/src/emu/tilemap.c
+++ b/src/emu/tilemap.c
@@ -213,9 +213,9 @@ inline void tilemap_t::scanline_draw_masked_ind16(UINT16 *dest, const UINT16 *so
// RGB bitmap
//-------------------------------------------------
-inline void tilemap_t::scanline_draw_opaque_rgb32(UINT32 *dest, const UINT16 *source, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode)
+inline void tilemap_t::scanline_draw_opaque_rgb32(UINT32 *dest, const UINT16 *source, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode)
{
- const pen_t *clut = &pens[pcode >> 16];
+ const rgb_t *clut = &pens[pcode >> 16];
// priority case
if ((pcode & 0xffff) != 0xff00)
@@ -241,9 +241,9 @@ inline void tilemap_t::scanline_draw_opaque_rgb32(UINT32 *dest, const UINT16 *so
// RGB bitmap using a mask
//-------------------------------------------------
-inline void tilemap_t::scanline_draw_masked_rgb32(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode)
+inline void tilemap_t::scanline_draw_masked_rgb32(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode)
{
- const pen_t *clut = &pens[pcode >> 16];
+ const rgb_t *clut = &pens[pcode >> 16];
// priority case
if ((pcode & 0xffff) != 0xff00)
@@ -271,9 +271,9 @@ inline void tilemap_t::scanline_draw_masked_rgb32(UINT32 *dest, const UINT16 *so
// 32bpp RGB bitmap with alpha blending
//-------------------------------------------------
-inline void tilemap_t::scanline_draw_opaque_rgb32_alpha(UINT32 *dest, const UINT16 *source, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha)
+inline void tilemap_t::scanline_draw_opaque_rgb32_alpha(UINT32 *dest, const UINT16 *source, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha)
{
- const pen_t *clut = &pens[pcode >> 16];
+ const rgb_t *clut = &pens[pcode >> 16];
// priority case
if ((pcode & 0xffff) != 0xff00)
@@ -300,9 +300,9 @@ inline void tilemap_t::scanline_draw_opaque_rgb32_alpha(UINT32 *dest, const UINT
// blending
//-------------------------------------------------
-inline void tilemap_t::scanline_draw_masked_rgb32_alpha(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha)
+inline void tilemap_t::scanline_draw_masked_rgb32_alpha(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha)
{
- const pen_t *clut = &pens[pcode >> 16];
+ const rgb_t *clut = &pens[pcode >> 16];
// priority case
if ((pcode & 0xffff) != 0xff00)
@@ -1183,7 +1183,7 @@ void tilemap_t::draw_instance(_BitmapClass &dest, const blit_parameters &blit, i
x_end = MIN(x_end, x2);
// if we're rendering something, compute the pointers
- const rgb_t *clut = (dest.palette() != NULL) ? dest.palette()->entry_list_raw() : machine().pens;
+ const rgb_t *clut = (dest.palette() != NULL) ? dest.palette()->entry_list_raw() : reinterpret_cast<const rgb_t *>(machine().pens);
if (prev_trans != WHOLLY_TRANSPARENT)
{
const UINT16 *source0 = source_baseaddr + x_start;
@@ -1277,7 +1277,7 @@ void tilemap_t::draw_roz_core(_BitmapClass &destbitmap, const blit_parameters &b
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, bool wraparound)
{
// pre-cache all the inner loop values
- const rgb_t *clut = ((destbitmap.palette() != NULL) ? destbitmap.palette()->entry_list_raw() : machine().pens) + (blit.tilemap_priority_code >> 16);
+ const rgb_t *clut = ((destbitmap.palette() != NULL) ? destbitmap.palette()->entry_list_raw() : reinterpret_cast<const rgb_t *>(machine().pens)) + (blit.tilemap_priority_code >> 16);
bitmap_ind8 &priority_bitmap = *blit.priority;
const int xmask = m_pixmap.width() - 1;
const int ymask = m_pixmap.height() - 1;
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index 93a6e58a4f0..daf9684aa97 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -590,10 +590,10 @@ private:
void scanline_draw_masked_null(const UINT8 *maskptr, int mask, int value, int count, UINT8 *pri, UINT32 pcode);
void scanline_draw_opaque_ind16(UINT16 *dest, const UINT16 *source, int count, UINT8 *pri, UINT32 pcode);
void scanline_draw_masked_ind16(UINT16 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, UINT8 *pri, UINT32 pcode);
- void scanline_draw_opaque_rgb32(UINT32 *dest, const UINT16 *source, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode);
- void scanline_draw_masked_rgb32(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode);
- void scanline_draw_opaque_rgb32_alpha(UINT32 *dest, const UINT16 *source, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha);
- void scanline_draw_masked_rgb32_alpha(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const pen_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha);
+ void scanline_draw_opaque_rgb32(UINT32 *dest, const UINT16 *source, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode);
+ void scanline_draw_masked_rgb32(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode);
+ void scanline_draw_opaque_rgb32_alpha(UINT32 *dest, const UINT16 *source, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha);
+ void scanline_draw_masked_rgb32_alpha(UINT32 *dest, const UINT16 *source, const UINT8 *maskptr, int mask, int value, int count, const rgb_t *pens, UINT8 *pri, UINT32 pcode, UINT8 alpha);
// internal helpers
void postload();
@@ -765,7 +765,7 @@ private:
// macros to help form flags for tilemap_draw
#define TILEMAP_DRAW_CATEGORY(x) (x) // specify category to draw
-#define TILEMAP_DRAW_ALPHA(x) (TILEMAP_DRAW_ALPHA_FLAG | (rgb_clamp(x) << 24))
+#define TILEMAP_DRAW_ALPHA(x) (TILEMAP_DRAW_ALPHA_FLAG | (rgb_t::clamp(x) << 24))
// function definition for a get info callback
#define TILE_GET_INFO_MEMBER(_name) void _name(tilemap_t &tilemap, tile_data &tileinfo, tilemap_memory_index tile_index)
diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h
index 777d837f3a9..8b0c0418640 100644
--- a/src/emu/ui/devctrl.h
+++ b/src/emu/ui/devctrl.h
@@ -30,7 +30,7 @@ protected:
private:
// device iterator
- typedef device_type_iterator<&device_creator<_DeviceType>, _DeviceType> device_iterator;
+// typedef device_type_iterator<&device_creator<_DeviceType>, _DeviceType> device_iterator;
_DeviceType * m_device;
int m_count;
@@ -46,7 +46,7 @@ ui_menu_device_control<_DeviceType>::ui_menu_device_control(running_machine &mac
: ui_menu(machine, container)
{
device_iterator iter(machine.root_device());
- m_device = device ? device : iter.first();
+ m_device = device ? device : downcast<_DeviceType *>(iter.first());
m_count = iter.count();
}
@@ -79,7 +79,7 @@ void ui_menu_device_control<_DeviceType>::previous()
index--;
else
index = m_count - 1;
- m_device = iter.byindex(index);
+ m_device = downcast<_DeviceType *>(iter.byindex(index));
}
}
@@ -100,7 +100,7 @@ void ui_menu_device_control<_DeviceType>::next()
index++;
else
index = 0;
- m_device = iter.byindex(index);
+ m_device = downcast<_DeviceType *>(iter.byindex(index));
}
}
diff --git a/src/emu/ui/menu.c b/src/emu/ui/menu.c
index 57d20c990a5..3e35ee3a6c5 100644
--- a/src/emu/ui/menu.c
+++ b/src/emu/ui/menu.c
@@ -93,7 +93,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;
- hilight_bitmap->pix32(0, x) = MAKE_ARGB(alpha,0xff,0xff,0xff);
+ hilight_bitmap->pix32(0, x) = rgb_t(alpha,0xff,0xff,0xff);
}
hilight_texture = machine.render().texture_alloc();
hilight_texture->set_bitmap(*hilight_bitmap, hilight_bitmap->cliprect(), TEXFORMAT_ARGB32);
@@ -1073,7 +1073,7 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const
int x, y;
// start with all-transparent
- dest.fill(MAKE_ARGB(0x00,0x00,0x00,0x00));
+ dest.fill(rgb_t(0x00,0x00,0x00,0x00));
// render from the tip to the bottom
for (y = 0; y < height; y++)
@@ -1098,14 +1098,14 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const
if (x == 0)
{
dalpha = MIN(0xff, linewidth);
- target[x] = MAKE_ARGB(dalpha,0xff,0xff,0xff);
+ target[x] = rgb_t(dalpha,0xff,0xff,0xff);
}
// remaining columns consume two pixels, one on each side
else
{
dalpha = MIN(0x1fe, linewidth);
- target[x] = target[-x] = MAKE_ARGB(dalpha/2,0xff,0xff,0xff);
+ target[x] = target[-x] = rgb_t(dalpha/2,0xff,0xff,0xff);
}
// account for the weight we consumed */
diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c
index d4a4dc6afd3..ac5e0aba020 100644
--- a/src/emu/ui/ui.c
+++ b/src/emu/ui/ui.c
@@ -414,7 +414,7 @@ void ui_manager::update_and_render(render_container *container)
if (alpha > 255)
alpha = 255;
if (alpha >= 0)
- container->add_rect(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(alpha,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
+ container->add_rect(0.0f, 0.0f, 1.0f, 1.0f, rgb_t(alpha,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
}
// render any cheat stuff at the bottom
diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h
index 6d4e299a3bf..757d0deb437 100644
--- a/src/emu/ui/ui.h
+++ b/src/emu/ui/ui.h
@@ -34,27 +34,27 @@
#define UI_BOX_TB_BORDER (UI_TARGET_FONT_HEIGHT * 0.25f)
/* handy colors */
-#define ARGB_WHITE MAKE_ARGB(0xff,0xff,0xff,0xff)
-#define ARGB_BLACK MAKE_ARGB(0xff,0x00,0x00,0x00)
-#define UI_BORDER_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff)
-#define UI_BACKGROUND_COLOR MAKE_ARGB(0xef,0x10,0x10,0x30)
-#define UI_GFXVIEWER_BG_COLOR MAKE_ARGB(0xef,0x10,0x10,0x30)
-#define UI_GREEN_COLOR MAKE_ARGB(0xef,0x10,0x60,0x10)
-#define UI_YELLOW_COLOR MAKE_ARGB(0xef,0x60,0x60,0x10)
-#define UI_RED_COLOR MAKE_ARGB(0xf0,0x60,0x10,0x10)
-#define UI_UNAVAILABLE_COLOR MAKE_ARGB(0xff,0x40,0x40,0x40)
-#define UI_TEXT_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff)
-#define UI_TEXT_BG_COLOR MAKE_ARGB(0xef,0x00,0x00,0x00)
-#define UI_SUBITEM_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff)
-#define UI_CLONE_COLOR MAKE_ARGB(0xff,0x80,0x80,0x80)
-#define UI_SELECTED_COLOR MAKE_ARGB(0xff,0xff,0xff,0x00)
-#define UI_SELECTED_BG_COLOR MAKE_ARGB(0xef,0x80,0x80,0x00)
-#define UI_MOUSEOVER_COLOR MAKE_ARGB(0xff,0xff,0xff,0x80)
-#define UI_MOUSEOVER_BG_COLOR MAKE_ARGB(0x70,0x40,0x40,0x00)
-#define UI_MOUSEDOWN_COLOR MAKE_ARGB(0xff,0xff,0xff,0x80)
-#define UI_MOUSEDOWN_BG_COLOR MAKE_ARGB(0xb0,0x60,0x60,0x00)
-#define UI_DIPSW_COLOR MAKE_ARGB(0xff,0xff,0xff,0x00)
-#define UI_SLIDER_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff)
+#define ARGB_WHITE rgb_t(0xff,0xff,0xff,0xff)
+#define ARGB_BLACK rgb_t(0xff,0x00,0x00,0x00)
+#define UI_BORDER_COLOR rgb_t(0xff,0xff,0xff,0xff)
+#define UI_BACKGROUND_COLOR rgb_t(0xef,0x10,0x10,0x30)
+#define UI_GFXVIEWER_BG_COLOR rgb_t(0xef,0x10,0x10,0x30)
+#define UI_GREEN_COLOR rgb_t(0xef,0x10,0x60,0x10)
+#define UI_YELLOW_COLOR rgb_t(0xef,0x60,0x60,0x10)
+#define UI_RED_COLOR rgb_t(0xf0,0x60,0x10,0x10)
+#define UI_UNAVAILABLE_COLOR rgb_t(0xff,0x40,0x40,0x40)
+#define UI_TEXT_COLOR rgb_t(0xff,0xff,0xff,0xff)
+#define UI_TEXT_BG_COLOR rgb_t(0xef,0x00,0x00,0x00)
+#define UI_SUBITEM_COLOR rgb_t(0xff,0xff,0xff,0xff)
+#define UI_CLONE_COLOR rgb_t(0xff,0x80,0x80,0x80)
+#define UI_SELECTED_COLOR rgb_t(0xff,0xff,0xff,0x00)
+#define UI_SELECTED_BG_COLOR rgb_t(0xef,0x80,0x80,0x00)
+#define UI_MOUSEOVER_COLOR rgb_t(0xff,0xff,0xff,0x80)
+#define UI_MOUSEOVER_BG_COLOR rgb_t(0x70,0x40,0x40,0x00)
+#define UI_MOUSEDOWN_COLOR rgb_t(0xff,0xff,0xff,0x80)
+#define UI_MOUSEDOWN_BG_COLOR rgb_t(0xb0,0x60,0x60,0x00)
+#define UI_DIPSW_COLOR rgb_t(0xff,0xff,0xff,0x00)
+#define UI_SLIDER_COLOR rgb_t(0xff,0xff,0xff,0xff)
/* cancel return value for a UI handler */
#define UI_HANDLER_CANCEL ((UINT32)~0)
diff --git a/src/emu/ui/viewgfx.c b/src/emu/ui/viewgfx.c
index f1868c559af..08684111adb 100644
--- a/src/emu/ui/viewgfx.c
+++ b/src/emu/ui/viewgfx.c
@@ -780,10 +780,10 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
static void gfxset_draw_item(running_machine &machine, gfx_element *gfx, int index, bitmap_rgb32 &bitmap, int dstx, int dsty, int color, int rotate)
{
- static const pen_t default_palette[] =
+ static const rgb_t default_palette[] =
{
- MAKE_RGB(0,0,0), MAKE_RGB(0,0,255), MAKE_RGB(0,255,0), MAKE_RGB(0,255,255),
- MAKE_RGB(255,0,0), MAKE_RGB(255,0,255), MAKE_RGB(255,255,0), MAKE_RGB(255,255,255)
+ rgb_t(0,0,0), rgb_t(0,0,255), rgb_t(0,255,0), rgb_t(0,255,255),
+ rgb_t(255,0,0), rgb_t(255,0,255), rgb_t(255,255,0), rgb_t(255,255,255)
};
int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height() : gfx->width();
int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width() : gfx->height();
diff --git a/src/emu/video/315_5124.c b/src/emu/video/315_5124.c
index 96b6593894b..e730377b3aa 100644
--- a/src/emu/video/315_5124.c
+++ b/src/emu/video/315_5124.c
@@ -1595,9 +1595,9 @@ void sega315_5378_device::draw_scanline( int pixel_offset_x, int pixel_plot_y, i
rgb_t c3 = machine().pens[line3[x]];
rgb_t c4 = machine().pens[line4[x]];
m_tmpbitmap.pix32(pixel_plot_y, pixel_offset_x + x) =
- MAKE_RGB((RGB_RED(c1) / 6 + RGB_RED(c2) / 3 + RGB_RED(c3) / 3 + RGB_RED(c4) / 6 ),
- (RGB_GREEN(c1) / 6 + RGB_GREEN(c2) / 3 + RGB_GREEN(c3) / 3 + RGB_GREEN(c4) / 6 ),
- (RGB_BLUE(c1) / 6 + RGB_BLUE(c2) / 3 + RGB_BLUE(c3) / 3 + RGB_BLUE(c4) / 6 ) );
+ rgb_t((c1.r() / 6 + c2.r() / 3 + c3.r() / 3 + c4.r() / 6 ),
+ (c1.g() / 6 + c2.g() / 3 + c3.g() / 3 + c4.g() / 6 ),
+ (c1.b() / 6 + c2.b() / 3 + c3.b() / 3 + c4.b() / 6 ) );
}
return;
}
diff --git a/src/emu/video/cdp1861.c b/src/emu/video/cdp1861.c
index 3dc79ae2a6e..7578875ccf0 100644
--- a/src/emu/video/cdp1861.c
+++ b/src/emu/video/cdp1861.c
@@ -250,7 +250,7 @@ UINT32 cdp1861_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
}
else
{
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::black, cliprect);
}
return 0;
}
diff --git a/src/emu/video/cdp1862.c b/src/emu/video/cdp1862.c
index ba413991dfb..11ec5982edf 100644
--- a/src/emu/video/cdp1862.c
+++ b/src/emu/video/cdp1862.c
@@ -64,7 +64,7 @@ inline void cdp1862_device::initialize_palette()
g = (i & 1) ? luma : 0;
b = (i & 2) ? luma : 0;
- m_palette[i] = MAKE_RGB(r, g, b);
+ m_palette[i] = rgb_t(r, g, b);
}
}
diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c
index bbd334e2e09..fcc9247ad66 100644
--- a/src/emu/video/fixfreq.c
+++ b/src/emu/video/fixfreq.c
@@ -263,13 +263,13 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid)
rgb_t col;
if (m_vid < m_sync_threshold)
- col = MAKE_RGB(255, 0, 0);
+ col = rgb_t(255, 0, 0);
else
{
int colv = (int) ((m_vid - m_sync_threshold) / 3.7 * 255.0);
if (colv > 255)
colv = 255;
- col = MAKE_RGB(colv, colv, colv);
+ col = rgb_t(colv, colv, colv);
}
while (0 && pixels >= m_htotal)
diff --git a/src/emu/video/generic.c b/src/emu/video/generic.c
index 13c7eae3dd8..c3dbe69d2a8 100644
--- a/src/emu/video/generic.c
+++ b/src/emu/video/generic.c
@@ -106,15 +106,15 @@ const gfx_layout gfx_16x16x4_planar =
const rgb_t RGB_MONOCHROME_WHITE[] =
{
- RGB_BLACK,
- RGB_WHITE
+ rgb_t::black,
+ rgb_t::white
};
const rgb_t RGB_MONOCHROME_WHITE_HIGHLIGHT[] =
{
- RGB_BLACK,
- MAKE_RGB(0xc0, 0xc0, 0xc0),
- RGB_WHITE
+ rgb_t::black,
+ rgb_t(0xc0, 0xc0, 0xc0),
+ rgb_t::white
};
@@ -124,8 +124,8 @@ const rgb_t RGB_MONOCHROME_WHITE_HIGHLIGHT[] =
const rgb_t RGB_MONOCHROME_AMBER[] =
{
- RGB_BLACK,
- MAKE_RGB(0xf7, 0xaa, 0x00)
+ rgb_t::black,
+ rgb_t(0xf7, 0xaa, 0x00)
};
@@ -135,15 +135,15 @@ const rgb_t RGB_MONOCHROME_AMBER[] =
const rgb_t RGB_MONOCHROME_GREEN[] =
{
- RGB_BLACK,
- MAKE_RGB(0x00, 0xff, 0x00)
+ rgb_t::black,
+ rgb_t(0x00, 0xff, 0x00)
};
const rgb_t RGB_MONOCHROME_GREEN_HIGHLIGHT[] =
{
- RGB_BLACK,
- MAKE_RGB(0x00, 0xc0, 0x00),
- MAKE_RGB(0x00, 0xff, 0x00)
+ rgb_t::black,
+ rgb_t(0x00, 0xc0, 0x00),
+ rgb_t(0x00, 0xff, 0x00)
};
/*-------------------------------------------------
@@ -152,6 +152,6 @@ const rgb_t RGB_MONOCHROME_GREEN_HIGHLIGHT[] =
const rgb_t RGB_MONOCHROME_YELLOW[] =
{
- RGB_BLACK,
- MAKE_RGB(0xff, 0xff, 0x00)
+ rgb_t::black,
+ rgb_t(0xff, 0xff, 0x00)
};
diff --git a/src/emu/video/i8275x.c b/src/emu/video/i8275x.c
index d0ac9a0c7c9..0c4cbdecd14 100644
--- a/src/emu/video/i8275x.c
+++ b/src/emu/video/i8275x.c
@@ -530,7 +530,7 @@ UINT32 i8275x_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
{
if (!(m_status & ST_VE))
{
- m_bitmap.fill(RGB_BLACK);
+ m_bitmap.fill(rgb_t::black);
}
copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
diff --git a/src/emu/video/m50458.c b/src/emu/video/m50458.c
index ee8832aa3db..a29f3e10981 100644
--- a/src/emu/video/m50458.c
+++ b/src/emu/video/m50458.c
@@ -330,7 +330,7 @@ UINT32 m50458_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
bg_r = m_phase & 1 ? 0xdf : 0;
bg_g = m_phase & 2 ? 0xdf : 0;
bg_b = m_phase & 4 ? 0xdf : 0;
- bitmap.fill(MAKE_ARGB(0xff,bg_r,bg_g,bg_b),cliprect);
+ bitmap.fill(rgb_t(0xff,bg_r,bg_g,bg_b),cliprect);
for(y=0;y<12;y++)
{
diff --git a/src/emu/video/mb90082.c b/src/emu/video/mb90082.c
index a99434a243c..56f0b793431 100644
--- a/src/emu/video/mb90082.c
+++ b/src/emu/video/mb90082.c
@@ -210,7 +210,7 @@ UINT32 mb90082_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
bg_b = m_uc & 1 ? 0xdf : 0;
bg_g = m_uc & 2 ? 0xdf : 0;
bg_r = m_uc & 4 ? 0xdf : 0;
- bitmap.fill(MAKE_ARGB(0xff,bg_r,bg_g,bg_b),cliprect);
+ bitmap.fill(rgb_t(0xff,bg_r,bg_g,bg_b),cliprect);
for(y=0;y<12;y++)
{
diff --git a/src/emu/video/mb_vcu.c b/src/emu/video/mb_vcu.c
index ac0b9899281..c08c6daed33 100644
--- a/src/emu/video/mb_vcu.c
+++ b/src/emu/video/mb_vcu.c
@@ -72,7 +72,7 @@ WRITE8_MEMBER( mb_vcu_device::mb_vcu_paletteram_w )
bit0 = (m_palram[offset] >> 0) & 0x01;
b = combine_3_weights(m_weights_b, bit0, bit1, bit2);
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
//-------------------------------------------------
@@ -470,7 +470,7 @@ WRITE8_MEMBER( mb_vcu_device::background_color_w )
bit0 = (m_bk_color >> 0) & 0x01;
b = combine_3_weights(m_weights_b, bit0, bit1, bit2);
- palette_set_color(machine(), 0x100, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), 0x100, rgb_t(r, g, b));
}
READ8_MEMBER( mb_vcu_device::status_r )
diff --git a/src/emu/video/mc6845.c b/src/emu/video/mc6845.c
index 16811a956fe..03b10278475 100644
--- a/src/emu/video/mc6845.c
+++ b/src/emu/video/mc6845.c
@@ -1459,22 +1459,22 @@ mos8568_device::mos8568_device(const machine_config &mconfig, const char *tag, d
// VICE palette
static const rgb_t MOS8563_PALETTE[] =
{
- RGB_BLACK,
- MAKE_RGB(0x55, 0x55, 0x55),
- MAKE_RGB(0x00, 0x00, 0xaa),
- MAKE_RGB(0x55, 0x55, 0xff),
- MAKE_RGB(0x00, 0xaa, 0x00),
- MAKE_RGB(0x55, 0xff, 0x55),
- MAKE_RGB(0x00, 0xaa, 0xaa),
- MAKE_RGB(0x55, 0xff, 0xff),
- MAKE_RGB(0xaa, 0x00, 0x00),
- MAKE_RGB(0xff, 0x55, 0x55),
- MAKE_RGB(0xaa, 0x00, 0xaa),
- MAKE_RGB(0xff, 0x55, 0xff),
- MAKE_RGB(0xaa, 0x55, 0x00),
- MAKE_RGB(0xff, 0xff, 0x55),
- MAKE_RGB(0xaa, 0xaa, 0xaa),
- RGB_WHITE
+ rgb_t::black,
+ rgb_t(0x55, 0x55, 0x55),
+ rgb_t(0x00, 0x00, 0xaa),
+ rgb_t(0x55, 0x55, 0xff),
+ rgb_t(0x00, 0xaa, 0x00),
+ rgb_t(0x55, 0xff, 0x55),
+ rgb_t(0x00, 0xaa, 0xaa),
+ rgb_t(0x55, 0xff, 0xff),
+ rgb_t(0xaa, 0x00, 0x00),
+ rgb_t(0xff, 0x55, 0x55),
+ rgb_t(0xaa, 0x00, 0xaa),
+ rgb_t(0xff, 0x55, 0xff),
+ rgb_t(0xaa, 0x55, 0x00),
+ rgb_t(0xff, 0xff, 0x55),
+ rgb_t(0xaa, 0xaa, 0xaa),
+ rgb_t::white
};
diff --git a/src/emu/video/mc6847.c b/src/emu/video/mc6847.c
index 088f1117811..9f89f4ae353 100644
--- a/src/emu/video/mc6847.c
+++ b/src/emu/video/mc6847.c
@@ -97,24 +97,24 @@
const UINT32 mc6847_base_device::s_palette[mc6847_base_device::PALETTE_LENGTH] =
{
- MAKE_RGB(0x07, 0xff, 0x00), /* GREEN */
- MAKE_RGB(0xff, 0xff, 0x00), /* YELLOW */
- MAKE_RGB(0x3b, 0x08, 0xff), /* BLUE */
- MAKE_RGB(0xcc, 0x00, 0x3b), /* RED */
- MAKE_RGB(0xff, 0xff, 0xff), /* BUFF */
- MAKE_RGB(0x07, 0xe3, 0x99), /* CYAN */
- MAKE_RGB(0xff, 0x1c, 0xff), /* MAGENTA */
- MAKE_RGB(0xff, 0x81, 0x00), /* ORANGE */
-
- MAKE_RGB(0x00, 0x00, 0x00), /* BLACK */
- MAKE_RGB(0x07, 0xff, 0x00), /* GREEN */
- MAKE_RGB(0x00, 0x00, 0x00), /* BLACK */
- MAKE_RGB(0xff, 0xff, 0xff), /* BUFF */
-
- MAKE_RGB(0x00, 0x7c, 0x00), /* ALPHANUMERIC DARK GREEN */
- MAKE_RGB(0x07, 0xff, 0x00), /* ALPHANUMERIC BRIGHT GREEN */
- MAKE_RGB(0x91, 0x00, 0x00), /* ALPHANUMERIC DARK ORANGE */
- MAKE_RGB(0xff, 0x81, 0x00) /* ALPHANUMERIC BRIGHT ORANGE */
+ rgb_t(0x07, 0xff, 0x00), /* GREEN */
+ rgb_t(0xff, 0xff, 0x00), /* YELLOW */
+ rgb_t(0x3b, 0x08, 0xff), /* BLUE */
+ rgb_t(0xcc, 0x00, 0x3b), /* RED */
+ rgb_t(0xff, 0xff, 0xff), /* BUFF */
+ rgb_t(0x07, 0xe3, 0x99), /* CYAN */
+ rgb_t(0xff, 0x1c, 0xff), /* MAGENTA */
+ rgb_t(0xff, 0x81, 0x00), /* ORANGE */
+
+ rgb_t(0x00, 0x00, 0x00), /* BLACK */
+ rgb_t(0x07, 0xff, 0x00), /* GREEN */
+ rgb_t(0x00, 0x00, 0x00), /* BLACK */
+ rgb_t(0xff, 0xff, 0xff), /* BUFF */
+
+ rgb_t(0x00, 0x7c, 0x00), /* ALPHANUMERIC DARK GREEN */
+ rgb_t(0x07, 0xff, 0x00), /* ALPHANUMERIC BRIGHT GREEN */
+ rgb_t(0x91, 0x00, 0x00), /* ALPHANUMERIC DARK ORANGE */
+ rgb_t(0xff, 0x81, 0x00) /* ALPHANUMERIC BRIGHT ORANGE */
};
@@ -1878,23 +1878,23 @@ void s68047_device::hack_black_becomes_blue(bool flag)
const UINT32 s68047_device::s_s68047_hack_palette[16] =
{
- MAKE_RGB(0x07, 0xff, 0x00), /* GREEN */
- MAKE_RGB(0xff, 0xff, 0x00), /* YELLOW */
- MAKE_RGB(0x3b, 0x08, 0xff), /* BLUE */
- MAKE_RGB(0xcc, 0x00, 0x3b), /* RED */
- MAKE_RGB(0xff, 0xff, 0xff), /* BUFF */
- MAKE_RGB(0x07, 0xe3, 0x99), /* CYAN */
- MAKE_RGB(0xff, 0x1c, 0xff), /* MAGENTA */
- MAKE_RGB(0xff, 0x81, 0x00), /* ORANGE */
-
- MAKE_RGB(0x00, 0x00, 0x00), /* BLACK */
- MAKE_RGB(0x07, 0xff, 0x00), /* GREEN */
- MAKE_RGB(0x3b, 0x08, 0xff), /* BLUE */
- MAKE_RGB(0xff, 0xff, 0xff), /* BUFF */
-
- MAKE_RGB(0x00, 0x7c, 0x00), /* ALPHANUMERIC DARK GREEN */
- MAKE_RGB(0x07, 0xff, 0x00), /* ALPHANUMERIC BRIGHT GREEN */
- MAKE_RGB(0x91, 0x00, 0x00), /* ALPHANUMERIC DARK ORANGE */
- MAKE_RGB(0xff, 0x81, 0x00) /* ALPHANUMERIC BRIGHT ORANGE */
+ rgb_t(0x07, 0xff, 0x00), /* GREEN */
+ rgb_t(0xff, 0xff, 0x00), /* YELLOW */
+ rgb_t(0x3b, 0x08, 0xff), /* BLUE */
+ rgb_t(0xcc, 0x00, 0x3b), /* RED */
+ rgb_t(0xff, 0xff, 0xff), /* BUFF */
+ rgb_t(0x07, 0xe3, 0x99), /* CYAN */
+ rgb_t(0xff, 0x1c, 0xff), /* MAGENTA */
+ rgb_t(0xff, 0x81, 0x00), /* ORANGE */
+
+ rgb_t(0x00, 0x00, 0x00), /* BLACK */
+ rgb_t(0x07, 0xff, 0x00), /* GREEN */
+ rgb_t(0x3b, 0x08, 0xff), /* BLUE */
+ rgb_t(0xff, 0xff, 0xff), /* BUFF */
+
+ rgb_t(0x00, 0x7c, 0x00), /* ALPHANUMERIC DARK GREEN */
+ rgb_t(0x07, 0xff, 0x00), /* ALPHANUMERIC BRIGHT GREEN */
+ rgb_t(0x91, 0x00, 0x00), /* ALPHANUMERIC DARK ORANGE */
+ rgb_t(0xff, 0x81, 0x00) /* ALPHANUMERIC BRIGHT ORANGE */
};
diff --git a/src/emu/video/mc6847.h b/src/emu/video/mc6847.h
index 0243a6517aa..b8251a1f89d 100644
--- a/src/emu/video/mc6847.h
+++ b/src/emu/video/mc6847.h
@@ -296,10 +296,10 @@ protected:
emu_timer *setup_timer(device_timer_id id, double offset, double period);
// converts to B&W
- static pixel_t black_and_white(pixel_t color)
+ static pixel_t black_and_white(rgb_t color)
{
- UINT8 average_color = (RGB_RED(color) + RGB_GREEN(color) + RGB_BLUE(color)) / 3;
- return MAKE_RGB(average_color, average_color, average_color);
+ UINT8 average_color = (color.r() + color.g() + color.b()) / 3;
+ return rgb_t(average_color, average_color, average_color);
}
// changes the geometry
diff --git a/src/emu/video/psx.c b/src/emu/video/psx.c
index 562f2ef030d..ff1f44675e4 100644
--- a/src/emu/video/psx.c
+++ b/src/emu/video/psx.c
@@ -3788,7 +3788,7 @@ PALETTE_INIT_MEMBER( psxgpu_device, psx )
for( n_colour = 0; n_colour < 0x10000; n_colour++ )
{
- palette_set_color_rgb( machine(), n_colour, pal5bit(n_colour >> 0), pal5bit(n_colour >> 5), pal5bit(n_colour >> 10) );
+ palette_set_color( machine(), n_colour, pal555(n_colour, 0, 5, 10) );
}
}
diff --git a/src/emu/video/resnet.c b/src/emu/video/resnet.c
index 4b69fd0160a..863541f00ba 100644
--- a/src/emu/video/resnet.c
+++ b/src/emu/video/resnet.c
@@ -716,7 +716,7 @@ rgb_t *compute_res_net_all(running_machine &machine, const UINT8 *prom, const re
r = compute_res_net(t[0], RES_NET_CHAN_RED, di);
g = compute_res_net(t[1], RES_NET_CHAN_GREEN, di);
b = compute_res_net(t[2], RES_NET_CHAN_BLUE, di);
- rgb[i-rdi->start] = MAKE_RGB(r,g,b);
+ rgb[i-rdi->start] = rgb_t(r,g,b);
}
return rgb;
}
diff --git a/src/emu/video/rgbgen.h b/src/emu/video/rgbgen.h
index 637366aab8c..4359abb5780 100644
--- a/src/emu/video/rgbgen.h
+++ b/src/emu/video/rgbgen.h
@@ -63,9 +63,9 @@ INLINE void rgba_comp_to_rgbaint(rgbaint *rgb, INT16 a, INT16 r, INT16 g, INT16
INLINE void rgb_to_rgbint(rgbint *rgb, rgb_t color)
{
- rgb->r = RGB_RED(color);
- rgb->g = RGB_GREEN(color);
- rgb->b = RGB_BLUE(color);
+ rgb->r = color.r();
+ rgb->g = color.g();
+ rgb->b = color.b();
}
@@ -76,10 +76,10 @@ INLINE void rgb_to_rgbint(rgbint *rgb, rgb_t color)
INLINE void rgba_to_rgbaint(rgbaint *rgb, rgb_t color)
{
- rgb->a = RGB_ALPHA(color);
- rgb->r = RGB_RED(color);
- rgb->g = RGB_GREEN(color);
- rgb->b = RGB_BLUE(color);
+ rgb->a = color.a();
+ rgb->r = color.r();
+ rgb->g = color.g();
+ rgb->b = color.b();
}
@@ -90,7 +90,7 @@ INLINE void rgba_to_rgbaint(rgbaint *rgb, rgb_t color)
INLINE rgb_t rgbint_to_rgb(const rgbint *color)
{
- return MAKE_RGB(color->r, color->g, color->b);
+ return rgb_t(color->r, color->g, color->b);
}
@@ -101,7 +101,7 @@ INLINE rgb_t rgbint_to_rgb(const rgbint *color)
INLINE rgb_t rgbaint_to_rgba(const rgbaint *color)
{
- return MAKE_ARGB(color->a, color->r, color->g, color->b);
+ return rgb_t(color->a, color->r, color->g, color->b);
}
@@ -116,7 +116,7 @@ INLINE rgb_t rgbint_to_rgb_clamp(const rgbint *color)
UINT8 r = (color->r < 0) ? 0 : (color->r > 255) ? 255 : color->r;
UINT8 g = (color->g < 0) ? 0 : (color->g > 255) ? 255 : color->g;
UINT8 b = (color->b < 0) ? 0 : (color->b > 255) ? 255 : color->b;
- return MAKE_RGB(r, g, b);
+ return rgb_t(r, g, b);
}
@@ -132,7 +132,7 @@ INLINE rgb_t rgbaint_to_rgba_clamp(const rgbaint *color)
UINT8 r = (color->r < 0) ? 0 : (color->r > 255) ? 255 : color->r;
UINT8 g = (color->g < 0) ? 0 : (color->g > 255) ? 255 : color->g;
UINT8 b = (color->b < 0) ? 0 : (color->b > 255) ? 255 : color->b;
- return MAKE_ARGB(a, r, g, b);
+ return rgb_t(a, r, g, b);
}
@@ -402,10 +402,10 @@ INLINE rgb_t rgba_bilinear_filter(rgb_t rgb00, rgb_t rgb01, rgb_t rgb10, rgb_t r
rb0 = (rgb00 & 0x00ff00ff) + ((((rgb01 & 0x00ff00ff) - (rgb00 & 0x00ff00ff)) * u) >> 8);
rb1 = (rgb10 & 0x00ff00ff) + ((((rgb11 & 0x00ff00ff) - (rgb10 & 0x00ff00ff)) * u) >> 8);
- rgb00 >>= 8;
- rgb01 >>= 8;
- rgb10 >>= 8;
- rgb11 >>= 8;
+ rgb00 = rgb00 >> 8;
+ rgb01 = rgb01 >> 8;
+ rgb10 = rgb10 >> 8;
+ rgb11 = rgb11 >> 8;
ag0 = (rgb00 & 0x00ff00ff) + ((((rgb01 & 0x00ff00ff) - (rgb00 & 0x00ff00ff)) * u) >> 8);
ag1 = (rgb10 & 0x00ff00ff) + ((((rgb11 & 0x00ff00ff) - (rgb10 & 0x00ff00ff)) * u) >> 8);
@@ -452,10 +452,10 @@ INLINE void rgbaint_bilinear_filter(rgbaint *color, rgb_t rgb00, rgb_t rgb01, rg
rb0 = (rgb00 & 0x00ff00ff) + ((((rgb01 & 0x00ff00ff) - (rgb00 & 0x00ff00ff)) * u) >> 8);
rb1 = (rgb10 & 0x00ff00ff) + ((((rgb11 & 0x00ff00ff) - (rgb10 & 0x00ff00ff)) * u) >> 8);
- rgb00 >>= 8;
- rgb01 >>= 8;
- rgb10 >>= 8;
- rgb11 >>= 8;
+ rgb00 = rgb00 >> 8;
+ rgb01 = rgb01 >> 8;
+ rgb10 = rgb10 >> 8;
+ rgb11 = rgb11 >> 8;
ag0 = (rgb00 & 0x00ff00ff) + ((((rgb01 & 0x00ff00ff) - (rgb00 & 0x00ff00ff)) * u) >> 8);
ag1 = (rgb10 & 0x00ff00ff) + ((((rgb11 & 0x00ff00ff) - (rgb10 & 0x00ff00ff)) * u) >> 8);
diff --git a/src/emu/video/saa5050.c b/src/emu/video/saa5050.c
index cbdb43a6c70..bad179b3ff1 100644
--- a/src/emu/video/saa5050.c
+++ b/src/emu/video/saa5050.c
@@ -110,14 +110,14 @@ enum
static const rgb_t PALETTE[] =
{
- RGB_BLACK,
- MAKE_RGB(0xff, 0x00, 0x00),
- MAKE_RGB(0x00, 0xff, 0x00),
- MAKE_RGB(0xff, 0xff, 0x00),
- MAKE_RGB(0x00, 0x00, 0xff),
- MAKE_RGB(0xff, 0x00, 0xff),
- MAKE_RGB(0x00, 0xff, 0xff),
- RGB_WHITE
+ rgb_t::black,
+ rgb_t(0xff, 0x00, 0x00),
+ rgb_t(0x00, 0xff, 0x00),
+ rgb_t(0xff, 0xff, 0x00),
+ rgb_t(0x00, 0x00, 0xff),
+ rgb_t(0xff, 0x00, 0xff),
+ rgb_t(0x00, 0xff, 0xff),
+ rgb_t::white
};
@@ -475,7 +475,7 @@ UINT32 saa5050_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
int g = BIT(color, 1) * 0xff;
int b = BIT(color, 2) * 0xff;
- rgb_t rgb = MAKE_RGB(r, g, b);
+ rgb_t rgb = rgb_t(r, g, b);
bitmap.pix32(y, x++) = rgb;
bitmap.pix32(y, x++) = rgb;
diff --git a/src/emu/video/stvvdp2.c b/src/emu/video/stvvdp2.c
index 3399df7e1d2..4098646fa34 100644
--- a/src/emu/video/stvvdp2.c
+++ b/src/emu/video/stvvdp2.c
@@ -2317,11 +2317,11 @@ UINT8 saturn_state::stv_vdp2_check_vram_cycle_pattern_registers( UINT8 access_co
INLINE UINT32 stv_add_blend(UINT32 a, UINT32 b)
{
- UINT32 rb = (a & 0xff00ff) + (b & 0xff00ff);
- UINT32 g = (a & 0x00ff00) + (b & 0x00ff00);
- return MAKE_RGB((rb & 0x1000000) ? 0xff : RGB_RED(rb),
- (g & 0x0010000) ? 0xff : RGB_GREEN(g),
- (rb & 0x0000100) ? 0xff : RGB_BLUE(rb)
+ rgb_t rb = (a & 0xff00ff) + (b & 0xff00ff);
+ rgb_t g = (a & 0x00ff00) + (b & 0x00ff00);
+ return rgb_t((rb & 0x1000000) ? 0xff : rb.r(),
+ (g & 0x0010000) ? 0xff : g.g(),
+ (rb & 0x0000100) ? 0xff : rb.b()
);
}
@@ -2348,11 +2348,11 @@ void saturn_state::stv_vdp2_compute_color_offset( int *r, int *g, int *b, int co
if(*b > 0xff) { *b = 0xff; }
}
-void saturn_state::stv_vdp2_compute_color_offset_UINT32(UINT32 *rgb, int cor)
+void saturn_state::stv_vdp2_compute_color_offset_UINT32(rgb_t *rgb, int cor)
{
- int _r = RGB_RED(*rgb);
- int _g = RGB_GREEN(*rgb);
- int _b = RGB_BLUE(*rgb);
+ int _r = rgb->r();
+ int _g = rgb->g();
+ int _b = rgb->b();
if ( cor == 0 )
{
_r = (STV_VDP2_COAR & 0x100) ? (_r - (0x100 - (STV_VDP2_COAR & 0xff))) : ((STV_VDP2_COAR & 0xff) + _r);
@@ -2372,7 +2372,7 @@ void saturn_state::stv_vdp2_compute_color_offset_UINT32(UINT32 *rgb, int cor)
if(_b < 0) { _b = 0; }
if(_b > 0xff) { _b = 0xff; }
- *rgb = MAKE_RGB(_r, _g, _b);
+ *rgb = rgb_t(_r, _g, _b);
}
void saturn_state::stv_vdp2_drawgfxzoom(
@@ -2701,7 +2701,7 @@ void saturn_state::stv_vdp2_drawgfxzoom_rgb555(
if(stv2_current_tilemap.fade_control & 1)
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
- dest[x] = MAKE_RGB(r, g, b);
+ dest[x] = rgb_t(r, g, b);
x_index += dx;
}
@@ -2728,7 +2728,7 @@ void saturn_state::stv_vdp2_drawgfxzoom_rgb555(
if(stv2_current_tilemap.fade_control & 1)
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
- if( data ) dest[x] = MAKE_RGB(r, g, b);
+ if( data ) dest[x] = rgb_t(r, g, b);
x_index += dx;
}
@@ -2755,7 +2755,7 @@ void saturn_state::stv_vdp2_drawgfxzoom_rgb555(
if(stv2_current_tilemap.fade_control & 1)
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
- if( data ) dest[x] = alpha_blend_r32(dest[x], MAKE_RGB(r, g, b), alpha);
+ if( data ) dest[x] = alpha_blend_r32(dest[x], rgb_t(r, g, b), alpha);
x_index += dx;
}
@@ -2782,7 +2782,7 @@ void saturn_state::stv_vdp2_drawgfxzoom_rgb555(
if(stv2_current_tilemap.fade_control & 1)
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
- if( data ) dest[x] = stv_add_blend(dest[x], MAKE_RGB(r, g, b));
+ if( data ) dest[x] = stv_add_blend(dest[x], rgb_t(r, g, b));
x_index += dx;
}
@@ -2893,9 +2893,9 @@ void saturn_state::stv_vdp2_drawgfx_rgb555( bitmap_rgb32 &dest_bmp, const rectan
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
if ( transparency == STV_TRANSPARENCY_ALPHA )
- dest[x] = alpha_blend_r32( dest[x], MAKE_RGB(r, g, b), alpha );
+ dest[x] = alpha_blend_r32( dest[x], rgb_t(r, g, b), alpha );
else
- dest[x] = MAKE_RGB(r, g, b);
+ dest[x] = rgb_t(r, g, b);
}
x_index += dx;
}
@@ -3008,9 +3008,9 @@ void saturn_state::stv_vdp2_drawgfx_rgb888( bitmap_rgb32 &dest_bmp, const rectan
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
if ( transparency == STV_TRANSPARENCY_ALPHA )
- dest[x] = alpha_blend_r32( dest[x], MAKE_RGB(r, g, b), alpha );
+ dest[x] = alpha_blend_r32( dest[x], rgb_t(r, g, b), alpha );
else
- dest[x] = MAKE_RGB(r, g, b);
+ dest[x] = rgb_t(r, g, b);
}
x_index += dx;
}
@@ -3400,9 +3400,9 @@ void saturn_state::draw_rgb15_bitmap(bitmap_rgb32 &bitmap, const rectangle &clip
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap.pix32(ydst, xdst) = MAKE_RGB(r, g, b);
+ bitmap.pix32(ydst, xdst) = rgb_t(r, g, b);
else
- bitmap.pix32(ydst, xdst) = alpha_blend_r32( bitmap.pix32(ydst, xdst), MAKE_RGB(r, g, b), stv2_current_tilemap.alpha );
+ bitmap.pix32(ydst, xdst) = alpha_blend_r32( bitmap.pix32(ydst, xdst), rgb_t(r, g, b), stv2_current_tilemap.alpha );
}
}
}
@@ -3458,9 +3458,9 @@ void saturn_state::draw_rgb32_bitmap(bitmap_rgb32 &bitmap, const rectangle &clip
stv_vdp2_compute_color_offset(&r,&g,&b,stv2_current_tilemap.fade_control & 2);
if ( stv2_current_tilemap.colour_calculation_enabled == 0 )
- bitmap.pix32(ydst, xdst) = MAKE_RGB(r, g, b);
+ bitmap.pix32(ydst, xdst) = rgb_t(r, g, b);
else
- bitmap.pix32(ydst, xdst) = alpha_blend_r32( bitmap.pix32(ydst, xdst), MAKE_RGB(r, g, b), stv2_current_tilemap.alpha );
+ bitmap.pix32(ydst, xdst) = alpha_blend_r32( bitmap.pix32(ydst, xdst), rgb_t(r, g, b), stv2_current_tilemap.alpha );
}
}
}
@@ -4520,7 +4520,7 @@ void saturn_state::stv_vdp2_copy_roz_bitmap(bitmap_rgb32 &bitmap,
INT32 coeff_table_val;
UINT32 address;
UINT32 *line;
- UINT32 pix;
+ rgb_t pix;
//UINT32 coeff_line_color_screen_data;
INT32 clipxmask = 0, clipymask = 0;
@@ -5611,7 +5611,7 @@ void saturn_state::stv_vdp2_draw_back(bitmap_rgb32 &bitmap, const rectangle &cli
if(STV_VDP2_BKCOEN)
stv_vdp2_compute_color_offset( &r, &g, &b, STV_VDP2_BKCOSL );
- bitmap.pix32(y, x) = MAKE_RGB(r, g, b);
+ bitmap.pix32(y, x) = rgb_t(r, g, b);
}
}
}
@@ -5782,8 +5782,8 @@ WRITE32_MEMBER ( saturn_state::saturn_vdp2_cram_w )
b = ((m_vdp2_cram[offset] & 0x00ff0000) >> 16);
g = ((m_vdp2_cram[offset] & 0x0000ff00) >> 8);
r = ((m_vdp2_cram[offset] & 0x000000ff) >> 0);
- palette_set_color(space.machine(),offset,MAKE_RGB(r,g,b));
- palette_set_color(space.machine(),offset^0x400,MAKE_RGB(r,g,b));
+ palette_set_color(space.machine(),offset,rgb_t(r,g,b));
+ palette_set_color(space.machine(),offset^0x400,rgb_t(r,g,b));
}
break;
/*Mode 0*/
@@ -5826,8 +5826,8 @@ void saturn_state::refresh_palette_data( void )
b = ((m_vdp2_cram[c_i] & 0x00ff0000) >> 16);
g = ((m_vdp2_cram[c_i] & 0x0000ff00) >> 8);
r = ((m_vdp2_cram[c_i] & 0x000000ff) >> 0);
- palette_set_color(machine(),c_i,MAKE_RGB(r,g,b));
- palette_set_color(machine(),c_i+0x400,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),c_i,rgb_t(r,g,b));
+ palette_set_color(machine(),c_i+0x400,rgb_t(r,g,b));
}
}
break;
@@ -6206,9 +6206,9 @@ void saturn_state::stv_vdp2_fade_effects( void )
{
/*Fade A*/
color = palette_get_color(machine(), i);
- t_r = (STV_VDP2_COAR & 0x100) ? (RGB_RED(color) - (0x100 - (STV_VDP2_COAR & 0xff))) : ((STV_VDP2_COAR & 0xff) + RGB_RED(color));
- t_g = (STV_VDP2_COAG & 0x100) ? (RGB_GREEN(color) - (0x100 - (STV_VDP2_COAG & 0xff))) : ((STV_VDP2_COAG & 0xff) + RGB_GREEN(color));
- t_b = (STV_VDP2_COAB & 0x100) ? (RGB_BLUE(color) - (0x100 - (STV_VDP2_COAB & 0xff))) : ((STV_VDP2_COAB & 0xff) + RGB_BLUE(color));
+ t_r = (STV_VDP2_COAR & 0x100) ? (color.r() - (0x100 - (STV_VDP2_COAR & 0xff))) : ((STV_VDP2_COAR & 0xff) + color.r());
+ t_g = (STV_VDP2_COAG & 0x100) ? (color.g() - (0x100 - (STV_VDP2_COAG & 0xff))) : ((STV_VDP2_COAG & 0xff) + color.g());
+ t_b = (STV_VDP2_COAB & 0x100) ? (color.b() - (0x100 - (STV_VDP2_COAB & 0xff))) : ((STV_VDP2_COAB & 0xff) + color.b());
if(t_r < 0) { t_r = 0; }
if(t_r > 0xff) { t_r = 0xff; }
if(t_g < 0) { t_g = 0; }
@@ -6218,13 +6218,13 @@ void saturn_state::stv_vdp2_fade_effects( void )
r = t_r;
g = t_g;
b = t_b;
- palette_set_color(machine(),i+(2048*1),MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i+(2048*1),rgb_t(r,g,b));
/*Fade B*/
color = palette_get_color(machine(), i);
- t_r = (STV_VDP2_COBR & 0x100) ? (RGB_RED(color) - (0xff - (STV_VDP2_COBR & 0xff))) : ((STV_VDP2_COBR & 0xff) + RGB_RED(color));
- t_g = (STV_VDP2_COBG & 0x100) ? (RGB_GREEN(color) - (0xff - (STV_VDP2_COBG & 0xff))) : ((STV_VDP2_COBG & 0xff) + RGB_GREEN(color));
- t_b = (STV_VDP2_COBB & 0x100) ? (RGB_BLUE(color) - (0xff - (STV_VDP2_COBB & 0xff))) : ((STV_VDP2_COBB & 0xff) + RGB_BLUE(color));
+ t_r = (STV_VDP2_COBR & 0x100) ? (color.r() - (0xff - (STV_VDP2_COBR & 0xff))) : ((STV_VDP2_COBR & 0xff) + color.r());
+ t_g = (STV_VDP2_COBG & 0x100) ? (color.g() - (0xff - (STV_VDP2_COBG & 0xff))) : ((STV_VDP2_COBG & 0xff) + color.g());
+ t_b = (STV_VDP2_COBB & 0x100) ? (color.b() - (0xff - (STV_VDP2_COBB & 0xff))) : ((STV_VDP2_COBB & 0xff) + color.b());
if(t_r < 0) { t_r = 0; }
if(t_r > 0xff) { t_r = 0xff; }
if(t_g < 0) { t_g = 0; }
@@ -6234,7 +6234,7 @@ void saturn_state::stv_vdp2_fade_effects( void )
r = t_r;
g = t_g;
b = t_b;
- palette_set_color(machine(),i+(2048*2),MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i+(2048*2),rgb_t(r,g,b));
}
//popmessage("%04x %04x %04x %04x %04x %04x",STV_VDP2_COAR,STV_VDP2_COAG,STV_VDP2_COAB,STV_VDP2_COBR,STV_VDP2_COBG,STV_VDP2_COBB);
}
@@ -6552,7 +6552,7 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
stv_vdp2_compute_color_offset( &r, &g, &b, STV_VDP2_SPCOSL );
}
- bitmap_line[x] = MAKE_RGB(r, g, b);
+ bitmap_line[x] = rgb_t(r, g, b);
}
else
{
@@ -6571,8 +6571,8 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
/*shadow - in reality, we should check from what layer pixel beneath comes...*/
if ( STV_VDP2_SDCTL & 0x3f )
{
- UINT32 p = bitmap_line[x];
- bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ rgb_t p = bitmap_line[x];
+ bitmap_line[x] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
/* note that when shadows are disabled, "shadow" palette entries are not drawn */
}
@@ -6590,8 +6590,8 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
{
if ( pix & ~sprite_shadow )
{
- UINT32 p = bitmap_line[x];
- bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ rgb_t p = bitmap_line[x];
+ bitmap_line[x] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
}
}
@@ -6634,11 +6634,11 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
ccr = sprite_ccr[0];
if ( STV_VDP2_CCMD )
{
- bitmap_line[x] = stv_add_blend( bitmap_line[x], MAKE_RGB(r, g, b));
+ bitmap_line[x] = stv_add_blend( bitmap_line[x], rgb_t(r, g, b));
}
else
{
- bitmap_line[x] = alpha_blend_r32( bitmap_line[x], MAKE_RGB(r, g ,b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
+ bitmap_line[x] = alpha_blend_r32( bitmap_line[x], rgb_t(r, g ,b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
}
}
else
@@ -6668,8 +6668,8 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
/*shadow - in reality, we should check from what layer pixel beneath comes...*/
if ( STV_VDP2_SDCTL & 0x3f )
{
- UINT32 p = bitmap_line[x];
- bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ rgb_t p = bitmap_line[x];
+ bitmap_line[x] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
/* note that when shadows are disabled, "shadow" palette entries are not drawn */
} else if ( pix )
@@ -6698,8 +6698,8 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
{
if ( pix & ~sprite_shadow )
{
- UINT32 p = bitmap_line[x];
- bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ rgb_t p = bitmap_line[x];
+ bitmap_line[x] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
}
}
@@ -6752,15 +6752,15 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
{
if(double_x)
{
- bitmap_line[x*2] = MAKE_RGB(r, g, b);
- if ( interlace_framebuffer == 1 ) bitmap_line2[x*2] = MAKE_RGB(r, g, b);
- bitmap_line[x*2+1] = MAKE_RGB(r, g, b);
- if ( interlace_framebuffer == 1 ) bitmap_line2[x*2+1] = MAKE_RGB(r, g, b);
+ bitmap_line[x*2] = rgb_t(r, g, b);
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x*2] = rgb_t(r, g, b);
+ bitmap_line[x*2+1] = rgb_t(r, g, b);
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x*2+1] = rgb_t(r, g, b);
}
else
{
- bitmap_line[x] = MAKE_RGB(r, g, b);
- if ( interlace_framebuffer == 1 ) bitmap_line2[x] = MAKE_RGB(r, g, b);
+ bitmap_line[x] = rgb_t(r, g, b);
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x] = rgb_t(r, g, b);
}
}
else // alpha_blend == 1
@@ -6771,30 +6771,30 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
{
if(double_x)
{
- bitmap_line[x*2] = stv_add_blend( bitmap_line[x*2], MAKE_RGB(r, g, b) );
- if ( interlace_framebuffer == 1 ) bitmap_line2[x*2] = stv_add_blend( bitmap_line2[x*2], MAKE_RGB(r, g, b) );
- bitmap_line[x*2+1] = stv_add_blend( bitmap_line[x*2+1], MAKE_RGB(r, g, b) );
- if ( interlace_framebuffer == 1 ) bitmap_line2[x*2+1] = stv_add_blend( bitmap_line2[x*2+1], MAKE_RGB(r, g, b) );
+ bitmap_line[x*2] = stv_add_blend( bitmap_line[x*2], rgb_t(r, g, b) );
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x*2] = stv_add_blend( bitmap_line2[x*2], rgb_t(r, g, b) );
+ bitmap_line[x*2+1] = stv_add_blend( bitmap_line[x*2+1], rgb_t(r, g, b) );
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x*2+1] = stv_add_blend( bitmap_line2[x*2+1], rgb_t(r, g, b) );
}
else
{
- bitmap_line[x] = stv_add_blend( bitmap_line[x], MAKE_RGB(r, g, b) );
- if ( interlace_framebuffer == 1 ) bitmap_line2[x] = stv_add_blend( bitmap_line2[x], MAKE_RGB(r, g, b) );
+ bitmap_line[x] = stv_add_blend( bitmap_line[x], rgb_t(r, g, b) );
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x] = stv_add_blend( bitmap_line2[x], rgb_t(r, g, b) );
}
}
else
{
if(double_x)
{
- bitmap_line[x*2] = alpha_blend_r32( bitmap_line[x*2], MAKE_RGB(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f );
- if ( interlace_framebuffer == 1 ) bitmap_line2[x*2] = alpha_blend_r32( bitmap_line2[x*2], MAKE_RGB(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f );
- bitmap_line[x*2+1] = alpha_blend_r32( bitmap_line[x*2+1], MAKE_RGB(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f );
- if ( interlace_framebuffer == 1 ) bitmap_line2[x*2+1] = alpha_blend_r32( bitmap_line2[x*2+1], MAKE_RGB(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
+ bitmap_line[x*2] = alpha_blend_r32( bitmap_line[x*2], rgb_t(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f );
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x*2] = alpha_blend_r32( bitmap_line2[x*2], rgb_t(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f );
+ bitmap_line[x*2+1] = alpha_blend_r32( bitmap_line[x*2+1], rgb_t(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f );
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x*2+1] = alpha_blend_r32( bitmap_line2[x*2+1], rgb_t(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
}
else
{
- bitmap_line[x] = alpha_blend_r32( bitmap_line[x], MAKE_RGB(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
- if ( interlace_framebuffer == 1 ) bitmap_line2[x] = alpha_blend_r32( bitmap_line2[x], MAKE_RGB(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
+ bitmap_line[x] = alpha_blend_r32( bitmap_line[x], rgb_t(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
+ if ( interlace_framebuffer == 1 ) bitmap_line2[x] = alpha_blend_r32( bitmap_line2[x], rgb_t(r, g, b), ((UINT16)(0x1f-ccr)*0xff)/0x1f);
}
}
}
@@ -6827,16 +6827,16 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
/*shadow - in reality, we should check from what layer pixel beneath comes...*/
if ( STV_VDP2_SDCTL & 0x3f )
{
- UINT32 p = bitmap_line[x];
+ rgb_t p = bitmap_line[x];
if(double_x)
{
p = bitmap_line[x*2];
- bitmap_line[x*2] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ bitmap_line[x*2] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
p = bitmap_line[x*2+1];
- bitmap_line[x*2+1] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ bitmap_line[x*2+1] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
else
- bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ bitmap_line[x] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
/* note that when shadows are disabled, "shadow" palette entries are not drawn */
} else if ( pix )
@@ -6900,16 +6900,16 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
{
if ( pix & ~sprite_shadow )
{
- UINT32 p = bitmap_line[x];
+ rgb_t p = bitmap_line[x];
if(double_x)
{
p = bitmap_line[x*2];
- bitmap_line[x*2] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ bitmap_line[x*2] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
p = bitmap_line[x*2+1];
- bitmap_line[x*2+1] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ bitmap_line[x*2+1] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
else
- bitmap_line[x] = MAKE_RGB(RGB_RED(p) >> 1, RGB_GREEN(p) >> 1, RGB_BLUE(p) >> 1);
+ bitmap_line[x] = rgb_t(p.r() >> 1, p.g() >> 1, p.b() >> 1);
}
}
}
diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c
index 0eaee1ae6be..5d8dcf7bf64 100644
--- a/src/emu/video/tlc34076.c
+++ b/src/emu/video/tlc34076.c
@@ -95,7 +95,7 @@ void tlc34076_device::device_reset()
// get_pens - retrieve current palette
//-------------------------------------------------
-const pen_t *tlc34076_device::get_pens()
+const rgb_t *tlc34076_device::get_pens()
{
offs_t i;
@@ -123,7 +123,7 @@ const pen_t *tlc34076_device::get_pens()
b = 0;
}
- m_pens[i] = MAKE_RGB(r, g, b);
+ m_pens[i] = rgb_t(r, g, b);
}
return m_pens;
diff --git a/src/emu/video/tlc34076.h b/src/emu/video/tlc34076.h
index a2aac64aec9..675b77b2f52 100644
--- a/src/emu/video/tlc34076.h
+++ b/src/emu/video/tlc34076.h
@@ -38,7 +38,7 @@ public:
static void static_set_bits(device_t &device, tlc34076_bits bits);
// public interface
- const pen_t *get_pens();
+ const rgb_t *get_pens();
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c
index 408bf7ed290..54e55193532 100644
--- a/src/emu/video/tms9928a.c
+++ b/src/emu/video/tms9928a.c
@@ -72,22 +72,22 @@ ADDRESS_MAP_END
*/
static const rgb_t tms9928a_palette[TMS9928A_PALETTE_SIZE] =
{
- RGB_BLACK,
- RGB_BLACK,
- MAKE_RGB(33, 200, 66),
- MAKE_RGB(94, 220, 120),
- MAKE_RGB(84, 85, 237),
- MAKE_RGB(125, 118, 252),
- MAKE_RGB(212, 82, 77),
- MAKE_RGB(66, 235, 245),
- MAKE_RGB(252, 85, 84),
- MAKE_RGB(255, 121, 120),
- MAKE_RGB(212, 193, 84),
- MAKE_RGB(230, 206, 128),
- MAKE_RGB(33, 176, 59),
- MAKE_RGB(201, 91, 186),
- MAKE_RGB(204, 204, 204),
- RGB_WHITE
+ rgb_t::black,
+ rgb_t::black,
+ rgb_t(33, 200, 66),
+ rgb_t(94, 220, 120),
+ rgb_t(84, 85, 237),
+ rgb_t(125, 118, 252),
+ rgb_t(212, 82, 77),
+ rgb_t(66, 235, 245),
+ rgb_t(252, 85, 84),
+ rgb_t(255, 121, 120),
+ rgb_t(212, 193, 84),
+ rgb_t(230, 206, 128),
+ rgb_t(33, 176, 59),
+ rgb_t(201, 91, 186),
+ rgb_t(204, 204, 204),
+ rgb_t::white
};
tms9928a_device::tms9928a_device( const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, bool is_50hz, bool is_reva, bool is_99, const char *shortname, const char *source)
@@ -176,7 +176,7 @@ void tms9928a_device::update_backdrop()
{
// update backdrop colour to transparent if EXTVID bit is set
if ((m_Regs[7] & 15) == 0)
- m_palette[0] = MAKE_ARGB(m_Regs[0] & 1 ? 0 : 255,0,0,0);
+ m_palette[0] = rgb_t(m_Regs[0] & 1 ? 0 : 255,0,0,0);
}
diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c
index 31a46bfd6e9..9874cdc1c70 100644
--- a/src/emu/video/v9938.c
+++ b/src/emu/video/v9938.c
@@ -312,7 +312,7 @@ PALETTE_INIT_MEMBER(v9958_device, v9958)
pal[i*3+0] = r;
pal[i*3+1] = g;
pal[i*3+2] = b;
- palette_set_color(machine(), i+512, MAKE_RGB(pal5bit(r), pal5bit(g), pal5bit(b)));
+ palette_set_color(machine(), i+512, rgb_t(pal5bit(r), pal5bit(g), pal5bit(b)));
v99x8_device::s_pal_indYJK[y | j << 5 | k << (5 + 6)] = i + 512;
i++;
}
diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c
index 69d615e7a62..8fc32f3f3ff 100644
--- a/src/emu/video/vector.c
+++ b/src/emu/video/vector.c
@@ -95,7 +95,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_argb32(TEXTURE_WIDTH, height));
- tex->bitmap.fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
+ tex->bitmap.fill(rgb_t(0xff,0xff,0xff,0xff));
totalint = 1.0f;
for (x = TEXTURE_WIDTH / 2 - 1; x >= 0; x--)
@@ -109,10 +109,10 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity)
UINT32 *pix;
pix = (UINT32 *)bitmap.base + y * bitmap.rowpixels + x;
- *pix = MAKE_ARGB((RGB_ALPHA(*pix) * intensity) >> 8,0xff,0xff,0xff);
+ *pix = rgb_t((*pix.a() * intensity) >> 8,0xff,0xff,0xff);
pix = (UINT32 *)bitmap.base + y * bitmap.rowpixels + (TEXTURE_WIDTH - 1 - x);
- *pix = MAKE_ARGB((RGB_ALPHA(*pix) * intensity) >> 8,0xff,0xff,0xff);
+ *pix = rgb_t((*pix.a() * intensity) >> 8,0xff,0xff,0xff);
}
}
@@ -264,7 +264,7 @@ UINT32 vector_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
curpoint = m_vector_list;
screen.container().empty();
- screen.container().add_rect(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_VECTORBUF(1));
+ screen.container().add_rect(0.0f, 0.0f, 1.0f, 1.0f, rgb_t(0xff,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_VECTORBUF(1));
clip.x0 = clip.y0 = 0.0f;
clip.x1 = clip.y1 = 1.0f;
diff --git a/src/emu/video/vector.h b/src/emu/video/vector.h
index cb4b2b04d54..d4a22eee177 100644
--- a/src/emu/video/vector.h
+++ b/src/emu/video/vector.h
@@ -2,13 +2,13 @@
#define __VECTOR__
#define VECTOR_COLOR111(c) \
- MAKE_RGB(pal1bit((c) >> 2), pal1bit((c) >> 1), pal1bit((c) >> 0))
+ rgb_t(pal1bit((c) >> 2), pal1bit((c) >> 1), pal1bit((c) >> 0))
#define VECTOR_COLOR222(c) \
- MAKE_RGB(pal2bit((c) >> 4), pal2bit((c) >> 2), pal2bit((c) >> 0))
+ rgb_t(pal2bit((c) >> 4), pal2bit((c) >> 2), pal2bit((c) >> 0))
#define VECTOR_COLOR444(c) \
- MAKE_RGB(pal4bit((c) >> 8), pal4bit((c) >> 4), pal4bit((c) >> 0))
+ rgb_t(pal4bit((c) >> 8), pal4bit((c) >> 4), pal4bit((c) >> 0))
/* The vertices are buffered here */
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index 1d0b8139c8a..7187ae621d1 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -334,18 +334,18 @@ int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &clipr
{
/* treat X as a 5-bit value, scale up to 8 bits, and linear interpolate for red/blue */
y = (x << 3) | (x >> 2);
- rtable[x] = (RGB_RED(v->fbi.clut[y >> 3]) * (8 - (y & 7)) + RGB_RED(v->fbi.clut[(y >> 3) + 1]) * (y & 7)) >> 3;
- btable[x] = (RGB_BLUE(v->fbi.clut[y >> 3]) * (8 - (y & 7)) + RGB_BLUE(v->fbi.clut[(y >> 3) + 1]) * (y & 7)) >> 3;
+ rtable[x] = (v->fbi.clut[y >> 3].r() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].r() * (y & 7)) >> 3;
+ btable[x] = (v->fbi.clut[y >> 3].b() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].b() * (y & 7)) >> 3;
/* treat X as a 6-bit value with LSB=0, scale up to 8 bits, and linear interpolate */
y = (x * 2) + 0;
y = (y << 2) | (y >> 4);
- gtable[x*2+0] = (RGB_GREEN(v->fbi.clut[y >> 3]) * (8 - (y & 7)) + RGB_GREEN(v->fbi.clut[(y >> 3) + 1]) * (y & 7)) >> 3;
+ gtable[x*2+0] = (v->fbi.clut[y >> 3].g() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3;
/* treat X as a 6-bit value with LSB=1, scale up to 8 bits, and linear interpolate */
y = (x * 2) + 1;
y = (y << 2) | (y >> 4);
- gtable[x*2+1] = (RGB_GREEN(v->fbi.clut[y >> 3]) * (8 - (y & 7)) + RGB_GREEN(v->fbi.clut[(y >> 3) + 1]) * (y & 7)) >> 3;
+ gtable[x*2+1] = (v->fbi.clut[y >> 3].g() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3;
}
}
@@ -360,18 +360,18 @@ int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &clipr
{
/* treat X as a 5-bit value, scale up to 8 bits */
y = (x << 3) | (x >> 2);
- rtable[x] = bypass ? y : RGB_RED(v->fbi.clut[which * 256 + y]);
- btable[x] = bypass ? y : RGB_BLUE(v->fbi.clut[which * 256 + y]);
+ rtable[x] = bypass ? y : v->fbi.clut[which * 256 + y].r();
+ btable[x] = bypass ? y : v->fbi.clut[which * 256 + y].b();
/* treat X as a 6-bit value with LSB=0, scale up to 8 bits */
y = (x * 2) + 0;
y = (y << 2) | (y >> 4);
- gtable[x*2+0] = bypass ? y : RGB_GREEN(v->fbi.clut[which * 256 + y]);
+ gtable[x*2+0] = bypass ? y : v->fbi.clut[which * 256 + y].g();
/* treat X as a 6-bit value with LSB=1, scale up to 8 bits, and linear interpolate */
y = (x * 2) + 1;
y = (y << 2) | (y >> 4);
- gtable[x*2+1] = bypass ? y : RGB_GREEN(v->fbi.clut[which * 256 + y]);
+ gtable[x*2+1] = bypass ? y : v->fbi.clut[which * 256 + y].g();
}
}
@@ -381,7 +381,7 @@ int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &clipr
int r = rtable[(x >> 11) & 0x1f];
int g = gtable[(x >> 5) & 0x3f];
int b = btable[x & 0x1f];
- v->fbi.pen[x] = MAKE_RGB(r, g, b);
+ v->fbi.pen[x] = rgb_t(r, g, b);
}
/* no longer dirty */
@@ -487,13 +487,13 @@ static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem)
if (v->type <= TYPE_VOODOO_2)
{
for (pen = 0; pen < 32; pen++)
- v->fbi.clut[pen] = MAKE_ARGB(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen));
- v->fbi.clut[32] = MAKE_ARGB(32,0xff,0xff,0xff);
+ v->fbi.clut[pen] = rgb_t(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen));
+ v->fbi.clut[32] = rgb_t(32,0xff,0xff,0xff);
}
else
{
for (pen = 0; pen < 512; pen++)
- v->fbi.clut[pen] = MAKE_RGB(pen,pen,pen);
+ v->fbi.clut[pen] = rgb_t(pen,pen,pen);
}
/* allocate a VBLANK timer */
@@ -520,18 +520,18 @@ static void init_tmu_shared(tmu_shared_state *s)
/* 8-bit RGB (3-3-2) */
EXTRACT_332_TO_888(val, r, g, b);
- s->rgb332[val] = MAKE_ARGB(0xff, r, g, b);
+ s->rgb332[val] = rgb_t(0xff, r, g, b);
/* 8-bit alpha */
- s->alpha8[val] = MAKE_ARGB(val, val, val, val);
+ s->alpha8[val] = rgb_t(val, val, val, val);
/* 8-bit intensity */
- s->int8[val] = MAKE_ARGB(0xff, val, val, val);
+ s->int8[val] = rgb_t(0xff, val, val, val);
/* 8-bit alpha, intensity */
a = ((val >> 0) & 0xf0) | ((val >> 4) & 0x0f);
r = ((val << 4) & 0xf0) | ((val << 0) & 0x0f);
- s->ai44[val] = MAKE_ARGB(a, r, r, r);
+ s->ai44[val] = rgb_t(a, r, r, r);
}
/* build static 16-bit texel tables */
@@ -541,15 +541,15 @@ static void init_tmu_shared(tmu_shared_state *s)
/* table 10 = 16-bit RGB (5-6-5) */
EXTRACT_565_TO_888(val, r, g, b);
- s->rgb565[val] = MAKE_ARGB(0xff, r, g, b);
+ s->rgb565[val] = rgb_t(0xff, r, g, b);
/* table 11 = 16 ARGB (1-5-5-5) */
EXTRACT_1555_TO_8888(val, a, r, g, b);
- s->argb1555[val] = MAKE_ARGB(a, r, g, b);
+ s->argb1555[val] = rgb_t(a, r, g, b);
/* table 12 = 16-bit ARGB (4-4-4-4) */
EXTRACT_4444_TO_8888(val, a, r, g, b);
- s->argb4444[val] = MAKE_ARGB(a, r, g, b);
+ s->argb4444[val] = rgb_t(a, r, g, b);
}
}
@@ -1205,7 +1205,7 @@ static void ncc_table_write(ncc_table *n, offs_t regnum, UINT32 data)
int r = ((data >> 10) & 0xfc) | ((data >> 16) & 0x03);
int g = ((data >> 4) & 0xfc) | ((data >> 10) & 0x03);
int b = ((data << 2) & 0xfc) | ((data >> 4) & 0x03);
- n->palettea[index] = MAKE_ARGB(a, r, g, b);
+ n->palettea[index] = rgb_t(a, r, g, b);
}
/* this doesn't dirty the table or go to the registers, so bail */
@@ -1274,7 +1274,7 @@ static void ncc_table_update(ncc_table *n)
CLAMP(b, 0, 255);
/* fill in the table */
- n->texel[i] = MAKE_ARGB(0xff, r, g, b);
+ n->texel[i] = rgb_t(0xff, r, g, b);
}
/* no longer dirty */
@@ -1777,15 +1777,15 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f)
{
if (command & (3 << 10))
{
- UINT32 argb = *src++;
+ rgb_t argb = *src++;
if (command & (1 << 10))
{
- svert.r = RGB_RED(argb);
- svert.g = RGB_GREEN(argb);
- svert.b = RGB_BLUE(argb);
+ svert.r = argb.r();
+ svert.g = argb.g();
+ svert.b = argb.b();
}
if (command & (1 << 11))
- svert.a = RGB_ALPHA(argb);
+ svert.a = argb.a();
}
}
@@ -2450,10 +2450,11 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data)
case sARGB:
if (chips & 1)
{
- v->reg[sAlpha].f = RGB_ALPHA(data);
- v->reg[sRed].f = RGB_RED(data);
- v->reg[sGreen].f = RGB_GREEN(data);
- v->reg[sBlue].f = RGB_BLUE(data);
+ rgb_t rgbdata(data);
+ v->reg[sAlpha].f = rgbdata.a();
+ v->reg[sRed].f = rgbdata.r();
+ v->reg[sGreen].f = rgbdata.g();
+ v->reg[sBlue].f = rgbdata.b();
}
break;
diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c
index 67081bb6554..3e6b11ed881 100644
--- a/src/lib/util/aviio.c
+++ b/src/lib/util/aviio.c
@@ -2327,10 +2327,10 @@ static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_rgb32 &b
for (x = 0; x < width && dest < dataend; x++)
{
- UINT32 pix = *source++;
- *dest++ = RGB_BLUE(pix);
- *dest++ = RGB_GREEN(pix);
- *dest++ = RGB_RED(pix);
+ rgb_t pix = *source++;
+ *dest++ = pix.b();
+ *dest++ = pix.g();
+ *dest++ = pix.r();
}
/* fill in any blank space on the right */
diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h
index 1de665cda2d..a82ec7eebfe 100644
--- a/src/lib/util/bitmap.h
+++ b/src/lib/util/bitmap.h
@@ -152,8 +152,8 @@ public:
// operations
void set_palette(palette_t *palette);
- void fill(rgb_t color) { fill(color, m_cliprect); }
- void fill(rgb_t color, const rectangle &cliprect);
+ void fill(UINT32 color) { fill(color, m_cliprect); }
+ void fill(UINT32 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);
diff --git a/src/lib/util/palette.c b/src/lib/util/palette.c
index a912b7f5672..58e5d6e1fa5 100644
--- a/src/lib/util/palette.c
+++ b/src/lib/util/palette.c
@@ -13,6 +13,9 @@
#include <math.h>
+const rgb_t rgb_t::black(0,0,0);
+const rgb_t rgb_t::white(255,255,255);
+
//**************************************************************************
// INLINE FUNCTIONS
@@ -25,11 +28,11 @@
inline rgb_t palette_t::adjust_palette_entry(rgb_t entry, float brightness, float contrast, const UINT8 *gamma_map)
{
- int r = rgb_clamp(float(gamma_map[RGB_RED(entry)]) * contrast + brightness);
- int g = rgb_clamp(float(gamma_map[RGB_GREEN(entry)]) * contrast + brightness);
- int b = rgb_clamp(float(gamma_map[RGB_BLUE(entry)]) * contrast + brightness);
- int a = RGB_ALPHA(entry);
- return MAKE_ARGB(a,r,g,b);
+ int r = rgb_t::clamp(float(gamma_map[entry.r()]) * contrast + brightness);
+ int g = rgb_t::clamp(float(gamma_map[entry.g()]) * contrast + brightness);
+ int b = rgb_t::clamp(float(gamma_map[entry.b()]) * contrast + brightness);
+ int a = entry.a();
+ return rgb_t(a,r,g,b);
}
@@ -224,7 +227,7 @@ palette_t::palette_t(UINT32 numcolors, UINT32 numgroups)
// initialize the per-entry data
for (UINT32 index = 0; index < numcolors; index++)
{
- m_entry_color[index] = RGB_BLACK;
+ m_entry_color[index] = rgb_t::black;
m_entry_contrast[index] = 1.0f;
}
@@ -238,15 +241,15 @@ palette_t::palette_t(UINT32 numcolors, UINT32 numgroups)
// initialize the expanded data
for (UINT32 index = 0; index < numcolors * numgroups; index++)
{
- m_adjusted_color[index] = RGB_BLACK;
- m_adjusted_rgb15[index] = rgb_to_rgb15(RGB_BLACK);
+ m_adjusted_color[index] = rgb_t::black;
+ m_adjusted_rgb15[index] = rgb_t::black.as_rgb15();
}
// add black and white as the last two colors
- m_adjusted_color[numcolors * numgroups + 0] = RGB_BLACK;
- m_adjusted_rgb15[numcolors * numgroups + 0] = rgb_to_rgb15(RGB_BLACK);
- m_adjusted_color[numcolors * numgroups + 1] = RGB_WHITE;
- m_adjusted_rgb15[numcolors * numgroups + 1] = rgb_to_rgb15(RGB_WHITE);
+ m_adjusted_color[numcolors * numgroups + 0] = rgb_t::black;
+ m_adjusted_rgb15[numcolors * numgroups + 0] = rgb_t::black.as_rgb15();
+ m_adjusted_color[numcolors * numgroups + 1] = rgb_t::white;
+ m_adjusted_rgb15[numcolors * numgroups + 1] = rgb_t::white.as_rgb15();
}
@@ -260,13 +263,11 @@ palette_t::~palette_t()
//-------------------------------------------------
-// deref - dereference a palette object; if the
-// reference count goes to 0, it is freed
+// palette_t - destructor
//-------------------------------------------------
void palette_t::deref()
{
- // if the reference count goes to 0, free
if (--m_refcount == 0)
delete this;
}
@@ -331,7 +332,7 @@ void palette_t::set_gamma(float gamma)
{
float fval = float(index) * (1.0f / 255.0f);
float fresult = pow(fval, gamma);
- m_gamma_map[index] = rgb_clamp(255.0f * fresult);
+ m_gamma_map[index] = rgb_t::clamp(255.0f * fresult);
}
// update across all indices in all groups
@@ -440,7 +441,7 @@ void palette_t::normalize_range(UINT32 start, UINT32 end, int lum_min, int lum_m
for (UINT32 index = start; index <= end; index++)
{
rgb_t rgb = m_entry_color[index];
- UINT32 y = 299 * RGB_RED(rgb) + 587 * RGB_GREEN(rgb) + 114 * RGB_BLUE(rgb);
+ UINT32 y = 299 * rgb.r() + 587 * rgb.g() + 114 * rgb.b();
ymin = MIN(ymin, y);
ymax = MAX(ymax, y);
}
@@ -453,14 +454,14 @@ void palette_t::normalize_range(UINT32 start, UINT32 end, int lum_min, int lum_m
for (UINT32 index = start; index <= end; index++)
{
rgb_t rgb = m_entry_color[index];
- INT32 y = 299 * RGB_RED(rgb) + 587 * RGB_GREEN(rgb) + 114 * RGB_BLUE(rgb);
- INT32 u = ((INT32)RGB_BLUE(rgb)-y /1000)*492 / 1000;
- INT32 v = ((INT32)RGB_RED(rgb)-y / 1000)*877 / 1000;
+ INT32 y = 299 * rgb.r() + 587 * rgb.g() + 114 * rgb.b();
+ INT32 u = ((INT32)rgb.b()-y /1000)*492 / 1000;
+ INT32 v = ((INT32)rgb.r()-y / 1000)*877 / 1000;
INT32 target = tmin + ((y - ymin) * (tmax - tmin + 1)) / (ymax - ymin);
- UINT8 r = rgb_clamp(target + 1140 * v / 1000);
- UINT8 g = rgb_clamp(target - 395 * u / 1000 - 581 * v / 1000);
- UINT8 b = rgb_clamp(target + 2032 * u / 1000);
- entry_set_color(index, MAKE_RGB(r, g, b));
+ UINT8 r = rgb_t::clamp(target + 1140 * v / 1000);
+ UINT8 g = rgb_t::clamp(target - 395 * u / 1000 - 581 * v / 1000);
+ UINT8 b = rgb_t::clamp(target + 2032 * u / 1000);
+ entry_set_color(index, rgb_t(r, g, b));
}
}
@@ -485,7 +486,7 @@ void palette_t::update_adjusted_color(UINT32 group, UINT32 index)
// otherwise, modify the adjusted color array
m_adjusted_color[finalindex] = adjusted;
- m_adjusted_rgb15[finalindex] = rgb_to_rgb15(adjusted);
+ m_adjusted_rgb15[finalindex] = adjusted.as_rgb15();
// mark dirty in all clients
for (palette_client *client = m_client_list; client != NULL; client = client->next())
diff --git a/src/lib/util/palette.h b/src/lib/util/palette.h
index db29477a8e7..120da95f87a 100644
--- a/src/lib/util/palette.h
+++ b/src/lib/util/palette.h
@@ -18,37 +18,70 @@
//**************************************************************************
-// MACROS
+// TYPE DEFINITIONS
//**************************************************************************
-// macros to assemble rgb_t values */
-#define MAKE_ARGB(a,r,g,b) (((rgb_t(a) & 0xff) << 24) | ((rgb_t(r) & 0xff) << 16) | ((rgb_t(g) & 0xff) << 8) | (rgb_t(b) & 0xff))
-#define MAKE_RGB(r,g,b) (MAKE_ARGB(255,r,g,b))
+// forward definitions
+class palette_t;
-// macros to extract components from rgb_t values */
-#define RGB_ALPHA(rgb) (((rgb) >> 24) & 0xff)
-#define RGB_RED(rgb) (((rgb) >> 16) & 0xff)
-#define RGB_GREEN(rgb) (((rgb) >> 8) & 0xff)
-#define RGB_BLUE(rgb) ((rgb) & 0xff)
+// an rgb15_t is a single combined 15-bit R,G,B value
+typedef UINT16 rgb15_t;
-// common colors */
-#define RGB_BLACK (MAKE_ARGB(255,0,0,0))
-#define RGB_WHITE (MAKE_ARGB(255,255,255,255))
+// ======================> rgb_t
+// an rgb_t is a single combined R,G,B (and optionally alpha) value
+class rgb_t
+{
+public:
+ // construction/destruction
+ rgb_t() { }
+ rgb_t(UINT32 data) { m_data = data; }
+ rgb_t(UINT8 r, UINT8 g, UINT8 b) { m_data = (255 << 24) | (r << 16) | (g << 8) | b; }
+ rgb_t(UINT8 a, UINT8 r, UINT8 g, UINT8 b) { m_data = (a << 24) | (r << 16) | (g << 8) | b; }
+
+ // getters
+ UINT8 a() const { return m_data >> 24; }
+ UINT8 r() const { return m_data >> 16; }
+ UINT8 g() const { return m_data >> 8; }
+ UINT8 b() const { return m_data >> 0; }
+ rgb15_t as_rgb15() const { return ((r() >> 3) << 10) | ((g() >> 3) << 5) | ((b() >> 3) << 0); }
+ UINT8 brightness() const { return (r() * 222 + g() * 707 + b() * 71) / 1000; }
+
+ // setters
+ rgb_t &set_a(UINT8 a) { m_data &= ~0xff000000; m_data |= a << 24; return *this; }
+ rgb_t &set_r(UINT8 r) { m_data &= ~0x00ff0000; m_data |= r << 16; return *this; }
+ rgb_t &set_g(UINT8 g) { m_data &= ~0x0000ff00; m_data |= g << 8; return *this; }
+ rgb_t &set_b(UINT8 b) { m_data &= ~0x000000ff; m_data |= b << 0; return *this; }
+
+ // implicit conversion operators
+ operator UINT32() const { return m_data; }
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
+ // operations
+ rgb_t &scale8(UINT8 scale) { m_data = rgb_t(clamphi((a() * scale) >> 8), clamphi((r() * scale) >> 8), clamphi((g() * scale) >> 8), clamphi((b() * scale) >> 8)); return *this; }
-// an rgb_t is a single combined R,G,B (and optionally alpha) value */
-typedef UINT32 rgb_t;
+ // assignment operators
+ rgb_t &operator=(UINT32 rhs) { m_data = rhs; return *this; }
+ rgb_t &operator+=(const rgb_t &rhs) { m_data = rgb_t(clamphi(a() + rhs.a()), clamphi(r() + rhs.r()), clamphi(g() + rhs.g()), clamphi(b() + rhs.b())); return *this; }
+ rgb_t &operator-=(const rgb_t &rhs) { m_data = rgb_t(clamplo(a() - rhs.a()), clamplo(r() - rhs.r()), clamplo(g() - rhs.g()), clamplo(b() - rhs.b())); return *this; }
+
+ // arithmetic operators
+ const rgb_t operator+(const rgb_t &rhs) const { rgb_t result = *this; result += rhs; return result; }
+ const rgb_t operator-(const rgb_t &rhs) const { rgb_t result = *this; result -= rhs; return result; }
+
+ // static helpers
+ static UINT8 clamp(INT32 value) { return (value < 0) ? 0 : (value > 255) ? 255 : value; }
+ static UINT8 clamphi(INT32 value) { return (value > 255) ? 255 : value; }
+ static UINT8 clamplo(INT32 value) { return (value < 0) ? 0 : value; }
-// an rgb15_t is a single combined 15-bit R,G,B value */
-typedef UINT16 rgb15_t;
+ // constants
+ static const rgb_t black;
+ static const rgb_t white;
+
+private:
+ UINT32 m_data;
+};
-// forward definitions
-class palette_t;
// ======================> palette_client
@@ -126,8 +159,8 @@ public:
void set_gamma(float gamma);
// entry getters
- rgb_t entry_color(UINT32 index) const { return (index < m_numcolors) ? m_entry_color[index] : RGB_BLACK; }
- rgb_t entry_adjusted_color(UINT32 index) const { return (index < m_numcolors * m_numgroups) ? m_adjusted_color[index] : RGB_BLACK; }
+ rgb_t entry_color(UINT32 index) const { return (index < m_numcolors) ? m_entry_color[index] : rgb_t::black; }
+ rgb_t entry_adjusted_color(UINT32 index) const { return (index < m_numcolors * m_numgroups) ? m_adjusted_color[index] : rgb_t::black; }
float entry_contrast(UINT32 index) const { return (index < m_numcolors) ? m_entry_contrast[index] : 1.0f; }
// entry setters
@@ -165,13 +198,13 @@ private:
float m_gamma; // overall gamma value
UINT8 m_gamma_map[256]; // gamma map
- dynamic_array<rgb_t> m_entry_color; // array of raw colors
- dynamic_array<float> m_entry_contrast; // contrast value for each entry
- dynamic_array<rgb_t> m_adjusted_color; // array of adjusted colors
- dynamic_array<rgb_t> m_adjusted_rgb15; // array of adjusted colors as RGB15
+ dynamic_array<rgb_t> m_entry_color; // array of raw colors
+ dynamic_array<float> m_entry_contrast; // contrast value for each entry
+ dynamic_array<rgb_t> m_adjusted_color; // array of adjusted colors
+ dynamic_array<rgb_t> m_adjusted_rgb15; // array of adjusted colors as RGB15
- dynamic_array<float> m_group_bright; // brightness value for each group
- dynamic_array<float> m_group_contrast; // contrast value for each group
+ dynamic_array<float> m_group_bright; // brightness value for each group
+ dynamic_array<float> m_group_contrast; // contrast value for each group
palette_client *m_client_list; // list of clients for this palette
};
@@ -183,177 +216,58 @@ private:
//**************************************************************************
//-------------------------------------------------
-// rgb_to_rgb15 - convert an RGB triplet to
-// a 15-bit OSD-specified RGB value
-//-------------------------------------------------
-
-inline rgb15_t rgb_to_rgb15(rgb_t rgb)
-{
- return ((RGB_RED(rgb) >> 3) << 10) | ((RGB_GREEN(rgb) >> 3) << 5) | ((RGB_BLUE(rgb) >> 3) << 0);
-}
-
-
-//-------------------------------------------------
-// rgb_clamp - clamp an RGB component to 0-255
-//-------------------------------------------------
-
-inline UINT8 rgb_clamp(INT32 value)
-{
- if (value < 0)
- return 0;
- if (value > 255)
- return 255;
- return value;
-}
-
-
-//-------------------------------------------------
-// pal1bit - convert a 1-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal1bit(UINT8 bits)
-{
- return (bits & 1) ? 0xff : 0x00;
-}
-
-
-//-------------------------------------------------
-// pal2bit - convert a 2-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal2bit(UINT8 bits)
-{
- bits &= 3;
- return (bits << 6) | (bits << 4) | (bits << 2) | bits;
-}
-
-
-//-------------------------------------------------
-// pal3bit - convert a 3-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal3bit(UINT8 bits)
-{
- bits &= 7;
- return (bits << 5) | (bits << 2) | (bits >> 1);
-}
-
-
-//-------------------------------------------------
-// pal4bit - convert a 4-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal4bit(UINT8 bits)
-{
- bits &= 0xf;
- return (bits << 4) | bits;
-}
-
-
-//-------------------------------------------------
-// pal5bit - convert a 5-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal5bit(UINT8 bits)
-{
- bits &= 0x1f;
- return (bits << 3) | (bits >> 2);
-}
-
-
-//-------------------------------------------------
-// pal6bit - convert a 6-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal6bit(UINT8 bits)
-{
- bits &= 0x3f;
- return (bits << 2) | (bits >> 4);
-}
-
-
-//-------------------------------------------------
-// pal7bit - convert a 7-bit value to 8 bits
-//-------------------------------------------------
-
-inline UINT8 pal7bit(UINT8 bits)
-{
- bits &= 0x7f;
- return (bits << 1) | (bits >> 6);
-}
-
-
-//-------------------------------------------------
// palexpand - expand a palette value to 8 bits
//-------------------------------------------------
template<int _NumBits>
-inline UINT8 palexpand(UINT8 data)
-{
- if (_NumBits == 1) return pal1bit(data);
- if (_NumBits == 2) return pal2bit(data);
- if (_NumBits == 3) return pal3bit(data);
- if (_NumBits == 4) return pal4bit(data);
- if (_NumBits == 5) return pal5bit(data);
- if (_NumBits == 6) return pal6bit(data);
- if (_NumBits == 7) return pal7bit(data);
- return data;
-}
-
-
-//-------------------------------------------------
-// pal332 - create a 3-3-2 color by extracting
-// bits from a UINT32
-//-------------------------------------------------
-
-inline rgb_t pal332(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
-{
- return MAKE_RGB(pal3bit(data >> rshift), pal3bit(data >> gshift), pal2bit(data >> bshift));
-}
-
-
-//-------------------------------------------------
-// pal444 - create a 4-4-4 color by extracting
-// bits from a UINT32
-//-------------------------------------------------
-
-inline rgb_t pal444(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
+inline UINT8 palexpand(UINT8 bits)
{
- return MAKE_RGB(pal4bit(data >> rshift), pal4bit(data >> gshift), pal4bit(data >> bshift));
+ if (_NumBits == 1) { return (bits & 1) ? 0xff : 0x00; }
+ if (_NumBits == 2) { bits &= 3; return (bits << 6) | (bits << 4) | (bits << 2) | bits; }
+ if (_NumBits == 3) { bits &= 7; return (bits << 5) | (bits << 2) | (bits >> 1); }
+ if (_NumBits == 4) { bits &= 0xf; return (bits << 4) | bits; }
+ if (_NumBits == 5) { bits &= 0x1f; return (bits << 3) | (bits >> 2); }
+ if (_NumBits == 6) { bits &= 0x3f; return (bits << 2) | (bits >> 4); }
+ if (_NumBits == 7) { bits &= 0x7f; return (bits << 1) | (bits >> 6); }
+ return bits;
}
//-------------------------------------------------
-// pal555 - create a 5-5-5 color by extracting
-// bits from a UINT32
+// palxbit - convert an x-bit value to 8 bits
//-------------------------------------------------
-inline rgb_t pal555(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
-{
- return MAKE_RGB(pal5bit(data >> rshift), pal5bit(data >> gshift), pal5bit(data >> bshift));
-}
+inline UINT8 pal1bit(UINT8 bits) { return palexpand<1>(bits); }
+inline UINT8 pal2bit(UINT8 bits) { return palexpand<2>(bits); }
+inline UINT8 pal3bit(UINT8 bits) { return palexpand<3>(bits); }
+inline UINT8 pal4bit(UINT8 bits) { return palexpand<4>(bits); }
+inline UINT8 pal5bit(UINT8 bits) { return palexpand<5>(bits); }
+inline UINT8 pal6bit(UINT8 bits) { return palexpand<6>(bits); }
+inline UINT8 pal7bit(UINT8 bits) { return palexpand<7>(bits); }
//-------------------------------------------------
-// pal565 - create a 5-6-5 color by extracting
-// bits from a UINT32
+// rgbexpand - expand a 32-bit raw data to 8-bit
+// RGB
//-------------------------------------------------
-inline rgb_t pal565(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
+template<int _RBits, int _GBits, int _BBits>
+inline rgb_t rgbexpand(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
{
- return MAKE_RGB(pal5bit(data >> rshift), pal6bit(data >> gshift), pal5bit(data >> bshift));
+ return rgb_t(palexpand<_RBits>(data >> rshift), palexpand<_GBits>(data >> gshift), palexpand<_BBits>(data >> bshift));
}
//-------------------------------------------------
-// pal888 - create a 8-8-8 color by extracting
+// palxxx - create an x-x-x color by extracting
// bits from a UINT32
//-------------------------------------------------
-inline rgb_t pal888(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift)
-{
- return MAKE_RGB(data >> rshift, data >> gshift, data >> bshift);
-}
+inline rgb_t pal332(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) { return rgbexpand<3,3,2>(data, rshift, gshift, bshift); }
+inline rgb_t pal444(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) { return rgbexpand<4,4,4>(data, rshift, gshift, bshift); }
+inline rgb_t pal555(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) { return rgbexpand<5,5,5>(data, rshift, gshift, bshift); }
+inline rgb_t pal565(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) { return rgbexpand<5,6,5>(data, rshift, gshift, bshift); }
+inline rgb_t pal888(UINT32 data, UINT8 rshift, UINT8 gshift, UINT8 bshift) { return rgbexpand<8,8,8>(data, rshift, gshift, bshift); }
-#endif // __PALETTE_H__ */
+#endif // __PALETTE_H__
diff --git a/src/lib/util/png.c b/src/lib/util/png.c
index 06431a203d5..b88af8df44b 100644
--- a/src/lib/util/png.c
+++ b/src/lib/util/png.c
@@ -891,9 +891,9 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
for (x = 0; x < palette_length; x++)
{
rgb_t color = palette[x];
- pnginfo->palette[3 * x + 0] = RGB_RED(color);
- pnginfo->palette[3 * x + 1] = RGB_GREEN(color);
- pnginfo->palette[3 * x + 2] = RGB_BLUE(color);
+ pnginfo->palette[3 * x + 0] = color.r();
+ pnginfo->palette[3 * x + 1] = color.g();
+ pnginfo->palette[3 * x + 2] = color.b();
}
/* allocate memory for the image */
@@ -958,9 +958,9 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &
for (x = 0; x < pnginfo->width; x++)
{
rgb_t color = palette[*src16++];
- *dst++ = RGB_RED(color);
- *dst++ = RGB_GREEN(color);
- *dst++ = RGB_BLUE(color);
+ *dst++ = color.r();
+ *dst++ = color.g();
+ *dst++ = color.b();
}
}
@@ -970,10 +970,10 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &
UINT32 *src32 = reinterpret_cast<UINT32 *>(bitmap.raw_pixptr(y));
for (x = 0; x < pnginfo->width; x++)
{
- UINT32 raw = *src32++;
- *dst++ = RGB_RED(raw);
- *dst++ = RGB_GREEN(raw);
- *dst++ = RGB_BLUE(raw);
+ rgb_t raw = *src32++;
+ *dst++ = raw.r();
+ *dst++ = raw.g();
+ *dst++ = raw.b();
}
}
@@ -983,11 +983,11 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &
UINT32 *src32 = reinterpret_cast<UINT32 *>(bitmap.raw_pixptr(y));
for (x = 0; x < pnginfo->width; x++)
{
- UINT32 raw = *src32++;
- *dst++ = RGB_RED(raw);
- *dst++ = RGB_GREEN(raw);
- *dst++ = RGB_BLUE(raw);
- *dst++ = RGB_ALPHA(raw);
+ rgb_t raw = *src32++;
+ *dst++ = raw.r();
+ *dst++ = raw.g();
+ *dst++ = raw.b();
+ *dst++ = raw.a();
}
}
@@ -1060,7 +1060,7 @@ handle_error:
}
-png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette)
+png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette)
{
png_info pnginfo;
png_error error;
@@ -1117,7 +1117,7 @@ png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate)
return PNGERR_NONE;
}
-png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette)
+png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette)
{
return write_png_stream(fp, info, bitmap, palette_length, palette);
}
diff --git a/src/lib/util/png.h b/src/lib/util/png.h
index 531dce32d0f..52e5111d199 100644
--- a/src/lib/util/png.h
+++ b/src/lib/util/png.h
@@ -124,10 +124,10 @@ png_error png_read_bitmap(core_file *fp, bitmap_argb32 &bitmap);
png_error png_expand_buffer_8bit(png_info *p);
png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text);
-png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette);
+png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette);
png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate);
-png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette);
+png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const rgb_t *palette);
png_error mng_capture_stop(core_file *fp);
#endif /* __PNG_H__ */
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c
index 6bcb6c3968a..5606592f093 100644
--- a/src/mame/drivers/1942.c
+++ b/src/mame/drivers/1942.c
@@ -191,7 +191,7 @@ WRITE8_MEMBER(_1942_state::c1942p_palette_w)
int g = (data & 0x38) >> 3;
int b = (data & 0xc0) >> 6;
- colortable_palette_set_color(machine().colortable, offset, MAKE_RGB(r<<5,g<<5,b<<6));
+ colortable_palette_set_color(machine().colortable, offset, rgb_t(r<<5,g<<5,b<<6));
}
static ADDRESS_MAP_START( c1942p_map, AS_PROGRAM, 8, _1942_state )
diff --git a/src/mame/drivers/4enraya.c b/src/mame/drivers/4enraya.c
index 9f82bb0198e..9ca2ab73595 100644
--- a/src/mame/drivers/4enraya.c
+++ b/src/mame/drivers/4enraya.c
@@ -307,7 +307,7 @@ void _4enraya_state::palette_init()
/* RGB format */
for(i=0;i<8;i++)
- palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
+ palette_set_color(machine(), i, rgb_t(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
}
static MACHINE_CONFIG_START( 4enraya, _4enraya_state )
diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c
index f036034f43d..5f45edb33e8 100644
--- a/src/mame/drivers/5clown.c
+++ b/src/mame/drivers/5clown.c
@@ -589,7 +589,7 @@ void _5clown_state::palette_init()
bit2 = (color_prom[i] >> 2) & 0x01;
b = bk * (bit2 * 0xff);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c
index d21e8ffe7c0..a0fcb79373e 100644
--- a/src/mame/drivers/ace.c
+++ b/src/mame/drivers/ace.c
@@ -131,8 +131,8 @@ UINT32 aceal_state::screen_update_ace(screen_device &screen, bitmap_ind16 &bitma
void aceal_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine(), 1, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 0, rgb_t(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 1, rgb_t(0xff,0xff,0xff)); /* white */
}
diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c
index bc631beb6b2..2088ead53ef 100644
--- a/src/mame/drivers/acefruit.c
+++ b/src/mame/drivers/acefruit.c
@@ -285,24 +285,24 @@ WRITE8_MEMBER(acefruit_state::acefruit_solenoid_w)
void acefruit_state::palette_init()
{
/* sprites */
- palette_set_color( machine(), 0, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine(), 1, MAKE_RGB(0x00, 0x00, 0xff) );
- palette_set_color( machine(), 2, MAKE_RGB(0x00, 0xff, 0x00) );
- palette_set_color( machine(), 3, MAKE_RGB(0xff, 0x7f, 0x00) );
- palette_set_color( machine(), 4, MAKE_RGB(0xff, 0x00, 0x00) );
- palette_set_color( machine(), 5, MAKE_RGB(0xff, 0xff, 0x00) );
- palette_set_color( machine(), 6, MAKE_RGB(0xff, 0xff, 0xff) );
- palette_set_color( machine(), 7, MAKE_RGB(0x7f, 0x3f, 0x1f) );
+ palette_set_color( machine(), 0, rgb_t(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 1, rgb_t(0x00, 0x00, 0xff) );
+ palette_set_color( machine(), 2, rgb_t(0x00, 0xff, 0x00) );
+ palette_set_color( machine(), 3, rgb_t(0xff, 0x7f, 0x00) );
+ palette_set_color( machine(), 4, rgb_t(0xff, 0x00, 0x00) );
+ palette_set_color( machine(), 5, rgb_t(0xff, 0xff, 0x00) );
+ palette_set_color( machine(), 6, rgb_t(0xff, 0xff, 0xff) );
+ palette_set_color( machine(), 7, rgb_t(0x7f, 0x3f, 0x1f) );
/* tiles */
- palette_set_color( machine(), 8, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine(), 9, MAKE_RGB(0xff, 0xff, 0xff) );
- palette_set_color( machine(), 10, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine(), 11, MAKE_RGB(0x00, 0x00, 0xff) );
- palette_set_color( machine(), 12, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine(), 13, MAKE_RGB(0x00, 0xff, 0x00) );
- palette_set_color( machine(), 14, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine(), 15, MAKE_RGB(0xff, 0x00, 0x00) );
+ palette_set_color( machine(), 8, rgb_t(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 9, rgb_t(0xff, 0xff, 0xff) );
+ palette_set_color( machine(), 10, rgb_t(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 11, rgb_t(0x00, 0x00, 0xff) );
+ palette_set_color( machine(), 12, rgb_t(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 13, rgb_t(0x00, 0xff, 0x00) );
+ palette_set_color( machine(), 14, rgb_t(0x00, 0x00, 0x00) );
+ palette_set_color( machine(), 15, rgb_t(0xff, 0x00, 0x00) );
}
static ADDRESS_MAP_START( acefruit_map, AS_PROGRAM, 8, acefruit_state )
diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c
index dff944342fb..57bba2d241e 100644
--- a/src/mame/drivers/adp.c
+++ b/src/mame/drivers/adp.c
@@ -337,7 +337,7 @@ PALETTE_INIT_MEMBER(adp_state,adp)
bit2 = (i >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
@@ -459,7 +459,7 @@ WRITE8_MEMBER(adp_state::ramdac_io_w)
break;
case 2:
m_pal.b = ((data & 0x3f) << 2) | ((data & 0x30) >> 4);
- palette_set_color(machine(), m_pal.offs, MAKE_RGB(m_pal.r, m_pal.g, m_pal.b));
+ palette_set_color(machine(), m_pal.offs, rgb_t(m_pal.r, m_pal.g, m_pal.b));
m_pal.offs_internal = 0;
m_pal.offs++;
m_pal.offs&=0xff;
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c
index d7418e93f88..8c11f28cdb1 100644
--- a/src/mame/drivers/alg.c
+++ b/src/mame/drivers/alg.c
@@ -104,7 +104,7 @@ VIDEO_START_MEMBER(alg_state,alg)
VIDEO_START_CALL_MEMBER(amiga);
/* configure pen 4096 as transparent in the renderer and use it for the genlock color */
- palette_set_color(machine(), 4096, MAKE_ARGB(0,0,0,0));
+ palette_set_color(machine(), 4096, rgb_t(0,0,0,0));
amiga_set_genlock_color(machine(), 4096);
}
diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c
index 79a32257c99..fc1f6ea9c32 100644
--- a/src/mame/drivers/amaticmg.c
+++ b/src/mame/drivers/amaticmg.c
@@ -541,7 +541,7 @@ void amaticmg_state::palette_init()
bit2 = (color_prom[0] >> 5) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c
index 7ce58fe8f69..4654a2d56ad 100644
--- a/src/mame/drivers/aristmk4.c
+++ b/src/mame/drivers/aristmk4.c
@@ -1626,7 +1626,7 @@ void aristmk4_state::palette_init()
bit2 = (color_prom[0] >> 7) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
@@ -1765,7 +1765,7 @@ PALETTE_INIT_MEMBER(aristmk4_state,lions)
bit1 = (i >> 5) & 0x01;
r = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c
index 5d44ef3c158..1f697c5f1fa 100644
--- a/src/mame/drivers/astinvad.c
+++ b/src/mame/drivers/astinvad.c
@@ -167,17 +167,17 @@ WRITE8_MEMBER(astinvad_state::spaceint_videoram_w)
void astinvad_state::plot_byte( bitmap_rgb32 &bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
{
- pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1));
+ pen_t fore_pen = rgb_t(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1));
UINT8 flip_xor = m_screen_flip & 7;
- bitmap.pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK;
- bitmap.pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK;
+ bitmap.pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : 0;
+ bitmap.pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : 0;
+ bitmap.pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : 0;
+ bitmap.pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : 0;
+ bitmap.pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : 0;
+ bitmap.pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : 0;
+ bitmap.pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : 0;
+ bitmap.pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : 0;
}
diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c
index 6e06e45f125..383fb723f39 100644
--- a/src/mame/drivers/astrof.c
+++ b/src/mame/drivers/astrof.c
@@ -188,7 +188,7 @@ rgb_t astrof_state::make_pen( UINT8 data )
UINT8 g = (0xc0 * g1_bit) + (0x3f * g2_bit);
UINT8 b = (0xc0 * b1_bit) + (0x3f * b2_bit);
- return MAKE_RGB(r, g, b);
+ return rgb_t(r, g, b);
}
diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c
index 09022ab333d..ba8f72949a9 100644
--- a/src/mame/drivers/atarifb.c
+++ b/src/mame/drivers/atarifb.c
@@ -120,22 +120,22 @@
void atarifb_state::palette_init()
{
/* chars */
- palette_set_color(machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* white */
- palette_set_color(machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 0, rgb_t(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 1, rgb_t(0x00,0x00,0x00)); /* black */
/* sprites */
- palette_set_color(machine(), 2, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine(), 3, MAKE_RGB(0xff,0xff,0xff)); /* white */
- palette_set_color(machine(), 4, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine(), 5, MAKE_RGB(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 2, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 3, rgb_t(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 4, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 5, rgb_t(0x00,0x00,0x00)); /* black */
/* sprite masks */
- palette_set_color(machine(), 6, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine(), 7, MAKE_RGB(0x80,0x80,0x80)); /* grey */
- palette_set_color(machine(), 8, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine(), 9, MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine(), 10, MAKE_RGB(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
- palette_set_color(machine(), 11, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 6, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 7, rgb_t(0x80,0x80,0x80)); /* grey */
+ palette_set_color(machine(), 8, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 9, rgb_t(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 10, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */
+ palette_set_color(machine(), 11, rgb_t(0xff,0xff,0xff)); /* white */
}
diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c
index 94a152d3a3e..ef0a4a26a11 100644
--- a/src/mame/drivers/atarisy4.c
+++ b/src/mame/drivers/atarisy4.c
@@ -400,7 +400,7 @@ void atarisy4_state::execute_gpu_command()
m_b_color_table[table_offs] = val;
/* Update */
- palette_set_color(machine(), table_offs, MAKE_RGB(m_r_color_table[table_offs], m_g_color_table[table_offs], m_b_color_table[table_offs]));
+ palette_set_color(machine(), table_offs, rgb_t(m_r_color_table[table_offs], m_g_color_table[table_offs], m_b_color_table[table_offs]));
++table_offs;
++offset;
diff --git a/src/mame/drivers/avalnche.c b/src/mame/drivers/avalnche.c
index a7ea092670d..8611cc5f049 100644
--- a/src/mame/drivers/avalnche.c
+++ b/src/mame/drivers/avalnche.c
@@ -61,9 +61,9 @@ UINT32 avalnche_state::screen_update_avalnche(screen_device &screen, bitmap_rgb3
pen_t pen;
if (m_avalance_video_inverted)
- pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
+ pen = (data & 0x80) ? rgb_t::white : rgb_t::black;
else
- pen = (data & 0x80) ? RGB_BLACK : RGB_WHITE;
+ pen = (data & 0x80) ? rgb_t::black : rgb_t::white;
bitmap.pix32(y, x) = pen;
diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c
index 8a264d71822..7205b611a2f 100644
--- a/src/mame/drivers/avt.c
+++ b/src/mame/drivers/avt.c
@@ -578,9 +578,9 @@ void avt_state::palette_init()
/* hack to switch cyan->magenta for highlighted background */
if (j == 0x40)
- palette_set_color(machine(), j, MAKE_RGB(g, r, b)); // Why this one has R-G swapped?...
+ palette_set_color(machine(), j, rgb_t(g, r, b)); // Why this one has R-G swapped?...
else
- palette_set_color(machine(), j, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), j, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/beaminv.c b/src/mame/drivers/beaminv.c
index 72f33416868..130a3e2ff68 100644
--- a/src/mame/drivers/beaminv.c
+++ b/src/mame/drivers/beaminv.c
@@ -183,7 +183,7 @@ UINT32 beaminv_state::screen_update_beaminv(screen_device &screen, bitmap_rgb32
for (i = 0; i < 8; i++)
{
- pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
+ pen_t pen = (data & 0x01) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x) = pen;
data = data >> 1;
diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c
index 39cfabf1906..a1e752cb767 100644
--- a/src/mame/drivers/berzerk.c
+++ b/src/mame/drivers/berzerk.c
@@ -80,7 +80,7 @@ public:
void start_irq_timer();
void create_nmi_timer();
void start_nmi_timer();
- void get_pens(pen_t *pens);
+ void get_pens(rgb_t *pens);
};
@@ -430,7 +430,7 @@ READ8_MEMBER(berzerk_state::intercept_v256_r)
}
-void berzerk_state::get_pens(pen_t *pens)
+void berzerk_state::get_pens(rgb_t *pens)
{
static const int resistances_wg[] = { 750, 0 };
static const int resistances_el[] = { 1.0 / ((1.0 / 750.0) + (1.0 / 360.0)), 0 };
@@ -460,14 +460,14 @@ void berzerk_state::get_pens(pen_t *pens)
UINT8 g = combine_2_weights(color_weights, g_bit & i_bit, g_bit);
UINT8 b = combine_2_weights(color_weights, b_bit & i_bit, b_bit);
- pens[color] = MAKE_RGB(r, g, b);
+ pens[color] = rgb_t(r, g, b);
}
}
UINT32 berzerk_state::screen_update_berzerk(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- pen_t pens[NUM_PENS];
+ rgb_t pens[NUM_PENS];
offs_t offs;
get_pens(pens);
@@ -484,7 +484,7 @@ UINT32 berzerk_state::screen_update_berzerk(screen_device &screen, bitmap_rgb32
for (i = 0; i < 4; i++)
{
- pen_t pen = (data & 0x80) ? pens[color >> 4] : RGB_BLACK;
+ rgb_t pen = (data & 0x80) ? pens[color >> 4] : rgb_t::black;
bitmap.pix32(y, x) = pen;
x = x + 1;
@@ -493,7 +493,7 @@ UINT32 berzerk_state::screen_update_berzerk(screen_device &screen, bitmap_rgb32
for (; i < 8; i++)
{
- pen_t pen = (data & 0x80) ? pens[color & 0x0f] : RGB_BLACK;
+ rgb_t pen = (data & 0x80) ? pens[color & 0x0f] : rgb_t::black;
bitmap.pix32(y, x) = pen;
x = x + 1;
diff --git a/src/mame/drivers/bfcobra.c b/src/mame/drivers/bfcobra.c
index c7909edd06d..610964a7a4f 100644
--- a/src/mame/drivers/bfcobra.c
+++ b/src/mame/drivers/bfcobra.c
@@ -766,9 +766,9 @@ READ8_MEMBER(bfcobra_state::ramdac_r)
rgb_t color;
color = palette_get_color(machine(), ramdac.addr_r);
- ramdac.color_r[0] = RGB_RED(color);
- ramdac.color_r[1] = RGB_GREEN(color);
- ramdac.color_r[2] = RGB_BLUE(color);
+ ramdac.color_r[0] = color.r();
+ ramdac.color_r[1] = color.g();
+ ramdac.color_r[2] = color.b();
}
val = ramdac.color_r[*count];
diff --git a/src/mame/drivers/blitz.c b/src/mame/drivers/blitz.c
index 54619ec124c..44caff5dc1a 100644
--- a/src/mame/drivers/blitz.c
+++ b/src/mame/drivers/blitz.c
@@ -412,7 +412,7 @@ void blitz_state::palette_init()
bit2 = (color_prom[i] >> 2) & 0x01;
b = bk * (bit2 * 0xff);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/blockade.c b/src/mame/drivers/blockade.c
index e1ff958fed3..bd78e006f96 100644
--- a/src/mame/drivers/blockade.c
+++ b/src/mame/drivers/blockade.c
@@ -439,8 +439,8 @@ GFXDECODE_END
void blockade_state::palette_init()
{
- palette_set_color(machine(),0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- palette_set_color(machine(),1,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ palette_set_color(machine(),0,rgb_t(0x00,0x00,0x00)); /* BLACK */
+ palette_set_color(machine(),1,rgb_t(0xff,0xff,0xff)); /* WHITE */
}
diff --git a/src/mame/drivers/bnstars.c b/src/mame/drivers/bnstars.c
index cff1dd2af31..da15237fc8c 100644
--- a/src/mame/drivers/bnstars.c
+++ b/src/mame/drivers/bnstars.c
@@ -366,7 +366,7 @@ void bnstars_state::update_color(int color, int screen)
g = ((m_ms32_pal_ram[screen][color*2] & 0x00ff) >>0 );
b = ((m_ms32_pal_ram[screen][color*2+1] & 0x00ff) >>0 );
- palette_set_color(machine(),color+screen*0x8000,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),color+screen*0x8000,rgb_t(r,g,b));
}
WRITE32_MEMBER(bnstars_state::ms32_pal0_ram_w)
diff --git a/src/mame/drivers/boxer.c b/src/mame/drivers/boxer.c
index f190627e970..2171892b257 100644
--- a/src/mame/drivers/boxer.c
+++ b/src/mame/drivers/boxer.c
@@ -145,11 +145,11 @@ TIMER_CALLBACK_MEMBER(boxer_state::periodic_callback)
void boxer_state::palette_init()
{
- palette_set_color(machine(),0, MAKE_RGB(0x00,0x00,0x00));
- palette_set_color(machine(),1, MAKE_RGB(0xff,0xff,0xff));
+ palette_set_color(machine(),0, rgb_t(0x00,0x00,0x00));
+ palette_set_color(machine(),1, rgb_t(0xff,0xff,0xff));
- palette_set_color(machine(),2, MAKE_RGB(0xff,0xff,0xff));
- palette_set_color(machine(),3, MAKE_RGB(0x00,0x00,0x00));
+ palette_set_color(machine(),2, rgb_t(0xff,0xff,0xff));
+ palette_set_color(machine(),3, rgb_t(0x00,0x00,0x00));
}
void boxer_state::draw_boxer( bitmap_ind16 &bitmap, const rectangle &cliprect )
diff --git a/src/mame/drivers/bsktball.c b/src/mame/drivers/bsktball.c
index 7a9c394e9c8..9d70de695d3 100644
--- a/src/mame/drivers/bsktball.c
+++ b/src/mame/drivers/bsktball.c
@@ -41,10 +41,10 @@ void bsktball_state::palette_init()
machine().colortable = colortable_alloc(machine(), 4);
- colortable_palette_set_color(machine().colortable,0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- colortable_palette_set_color(machine().colortable,1,MAKE_RGB(0x80,0x80,0x80)); /* LIGHT GREY */
- colortable_palette_set_color(machine().colortable,2,MAKE_RGB(0x50,0x50,0x50)); /* DARK GREY */
- colortable_palette_set_color(machine().colortable,3,MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ colortable_palette_set_color(machine().colortable,0,rgb_t(0x00,0x00,0x00)); /* BLACK */
+ colortable_palette_set_color(machine().colortable,1,rgb_t(0x80,0x80,0x80)); /* LIGHT GREY */
+ colortable_palette_set_color(machine().colortable,2,rgb_t(0x50,0x50,0x50)); /* DARK GREY */
+ colortable_palette_set_color(machine().colortable,3,rgb_t(0xff,0xff,0xff)); /* WHITE */
/* playfield */
for (i = 0; i < 2; i++)
diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c
index fd632c18d8a..a697749c98f 100644
--- a/src/mame/drivers/buster.c
+++ b/src/mame/drivers/buster.c
@@ -331,7 +331,7 @@ void buster_state::palette_init()
/* RGB format */
for(i=0;i<8;i++)
- palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
+ palette_set_color(machine(), i, rgb_t(pal1bit(i >> 0),pal1bit(i >> 1),pal1bit(i >> 2)));
}
static MACHINE_CONFIG_START( buster, buster_state )
diff --git a/src/mame/drivers/canyon.c b/src/mame/drivers/canyon.c
index ffe58167889..22043d27512 100644
--- a/src/mame/drivers/canyon.c
+++ b/src/mame/drivers/canyon.c
@@ -50,10 +50,10 @@
void canyon_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x80, 0x80, 0x80)); /* GREY */
- palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00)); /* BLACK */
- palette_set_color(machine(), 2, MAKE_RGB(0x80, 0x80, 0x80)); /* GREY */
- palette_set_color(machine(), 3, MAKE_RGB(0xff, 0xff, 0xff)); /* WHITE */
+ palette_set_color(machine(), 0, rgb_t(0x80, 0x80, 0x80)); /* GREY */
+ palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00)); /* BLACK */
+ palette_set_color(machine(), 2, rgb_t(0x80, 0x80, 0x80)); /* GREY */
+ palette_set_color(machine(), 3, rgb_t(0xff, 0xff, 0xff)); /* WHITE */
}
diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c
index 315112c197d..09dd7bd1a44 100644
--- a/src/mame/drivers/cardline.c
+++ b/src/mame/drivers/cardline.c
@@ -212,7 +212,7 @@ void cardline_state::palette_init()
bit0 = (data >> 0) & 0x01;
bit1 = (data >> 1) & 0x01;
b = 0x55 * bit0 + 0xaa * bit1;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c
index f1ca6cc894c..65902a154b6 100644
--- a/src/mame/drivers/carrera.c
+++ b/src/mame/drivers/carrera.c
@@ -307,7 +307,7 @@ void carrera_state::palette_init()
bit1 = (color_prom[0] >> 5) & 0x01;
r = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/caswin.c b/src/mame/drivers/caswin.c
index d9784e18472..d48375ce9df 100644
--- a/src/mame/drivers/caswin.c
+++ b/src/mame/drivers/caswin.c
@@ -322,7 +322,7 @@ void caswin_state::palette_init()
bit2 = (color_prom[0] >> 7) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/cb2001.c b/src/mame/drivers/cb2001.c
index 50abb87d283..e49c8dc8537 100644
--- a/src/mame/drivers/cb2001.c
+++ b/src/mame/drivers/cb2001.c
@@ -795,11 +795,11 @@ void cb2001_state::palette_init()
if (length==0x400) // are the cb2001 proms dumped incorrectly?
{
- if (!(i&0x20)) palette_set_color(machine(), (i&0x1f) | ((i&~0x3f)>>1), MAKE_RGB(r, g, b));
+ if (!(i&0x20)) palette_set_color(machine(), (i&0x1f) | ((i&~0x3f)>>1), rgb_t(r, g, b));
}
else
{
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
}
diff --git a/src/mame/drivers/cball.c b/src/mame/drivers/cball.c
index a7febea9076..abbe4e19503 100644
--- a/src/mame/drivers/cball.c
+++ b/src/mame/drivers/cball.c
@@ -126,12 +126,12 @@ void cball_state::machine_reset()
void cball_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x80, 0x80, 0x80));
- palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 2, MAKE_RGB(0x80, 0x80, 0x80));
- palette_set_color(machine(), 3, MAKE_RGB(0xff, 0xff, 0xff));
- palette_set_color(machine(), 4, MAKE_RGB(0x80, 0x80, 0x80));
- palette_set_color(machine(), 5, MAKE_RGB(0xc0, 0xc0, 0xc0));
+ palette_set_color(machine(), 0, rgb_t(0x80, 0x80, 0x80));
+ palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 2, rgb_t(0x80, 0x80, 0x80));
+ palette_set_color(machine(), 3, rgb_t(0xff, 0xff, 0xff));
+ palette_set_color(machine(), 4, rgb_t(0x80, 0x80, 0x80));
+ palette_set_color(machine(), 5, rgb_t(0xc0, 0xc0, 0xc0));
}
diff --git a/src/mame/drivers/cischeat.c b/src/mame/drivers/cischeat.c
index 715ca8eac82..3ebbacf9b43 100644
--- a/src/mame/drivers/cischeat.c
+++ b/src/mame/drivers/cischeat.c
@@ -198,17 +198,17 @@ WRITE16_MEMBER(cischeat_state::bigrun_paletteram16_w)
int b = pal5bit(((word >> 3 ) & 0x1E ) | ((word >> 1) & 0x01));
// Scroll 0
- if ( (offset >= 0x0e00/2) && (offset <= 0x0fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x0e00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x0e00/2) && (offset <= 0x0fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x0e00/2, rgb_t(r,g,b) ); return;}
// Scroll 1
- if ( (offset >= 0x1600/2) && (offset <= 0x17ff/2) ) { palette_set_color(machine(), 0x100 + offset - 0x1600/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x1600/2) && (offset <= 0x17ff/2) ) { palette_set_color(machine(), 0x100 + offset - 0x1600/2, rgb_t(r,g,b) ); return;}
// Road 0
- if ( (offset >= 0x1800/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x1800/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x1800/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x1800/2, rgb_t(r,g,b) ); return;}
// Road 1
- if ( (offset >= 0x2000/2) && (offset <= 0x27ff/2) ) { palette_set_color(machine(), 0x600 + offset - 0x2000/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x2000/2) && (offset <= 0x27ff/2) ) { palette_set_color(machine(), 0x600 + offset - 0x2000/2, rgb_t(r,g,b) ); return;}
// Sprites
- if ( (offset >= 0x2800/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine(), 0xa00 + offset - 0x2800/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x2800/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine(), 0xa00 + offset - 0x2800/2, rgb_t(r,g,b) ); return;}
// Scroll 2
- if ( (offset >= 0x3600/2) && (offset <= 0x37ff/2) ) { palette_set_color(machine(), 0xe00 + offset - 0x3600/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x3600/2) && (offset <= 0x37ff/2) ) { palette_set_color(machine(), 0xe00 + offset - 0x3600/2, rgb_t(r,g,b) ); return;}
}
static ADDRESS_MAP_START( bigrun_map, AS_PROGRAM, 16, cischeat_state )
@@ -251,17 +251,17 @@ WRITE16_MEMBER(cischeat_state::cischeat_paletteram16_w)
int b = pal5bit(((word >> 3 ) & 0x1E ) | ((word >> 1) & 0x01));
// Scroll 0
- if ( (offset >= 0x1c00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x1c00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x1c00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x1c00/2, rgb_t(r,g,b) ); return;}
// Scroll 1
- if ( (offset >= 0x2c00/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x2c00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x2c00/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x2c00/2, rgb_t(r,g,b) ); return;}
// Scroll 2
- if ( (offset >= 0x6c00/2) && (offset <= 0x6fff/2) ) { palette_set_color(machine(), 0x400 + offset - 0x6c00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x6c00/2) && (offset <= 0x6fff/2) ) { palette_set_color(machine(), 0x400 + offset - 0x6c00/2, rgb_t(r,g,b) ); return;}
// Road 0
- if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine(), 0x600 + offset - 0x3800/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine(), 0x600 + offset - 0x3800/2, rgb_t(r,g,b) ); return;}
// Road 1
- if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine(), 0xa00 + offset - 0x4800/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine(), 0xa00 + offset - 0x4800/2, rgb_t(r,g,b) ); return;}
// Sprites
- if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color(machine(), 0xe00 + offset - 0x5000/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color(machine(), 0xe00 + offset - 0x5000/2, rgb_t(r,g,b) ); return;}
}
static ADDRESS_MAP_START( cischeat_map, AS_PROGRAM, 16, cischeat_state )
@@ -303,17 +303,17 @@ WRITE16_MEMBER(cischeat_state::f1gpstar_paletteram16_w)
int b = pal5bit(((word >> 3 ) & 0x1E ) | ((word >> 1) & 0x01));
// Scroll 0
- if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x1e00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x1e00/2, rgb_t(r,g,b) ); return;}
// Scroll 1
- if ( (offset >= 0x2e00/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine(), 0x100 + offset - 0x2e00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x2e00/2) && (offset <= 0x2fff/2) ) { palette_set_color(machine(), 0x100 + offset - 0x2e00/2, rgb_t(r,g,b) ); return;}
// Scroll 2
- if ( (offset >= 0x6e00/2) && (offset <= 0x6fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x6e00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x6e00/2) && (offset <= 0x6fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x6e00/2, rgb_t(r,g,b) ); return;}
// Road 0
- if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine(), 0x300 + offset - 0x3800/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x3800/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine(), 0x300 + offset - 0x3800/2, rgb_t(r,g,b) ); return;}
// Road 1
- if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine(), 0x700 + offset - 0x4800/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x4800/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine(), 0x700 + offset - 0x4800/2, rgb_t(r,g,b) ); return;}
// Sprites
- if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color(machine(), 0xb00 + offset - 0x5000/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x5000/2) && (offset <= 0x5fff/2) ) { palette_set_color(machine(), 0xb00 + offset - 0x5000/2, rgb_t(r,g,b) ); return;}
}
/* F1 GP Star tests:
@@ -384,11 +384,11 @@ WRITE16_MEMBER(cischeat_state::scudhamm_paletteram16_w)
int b = pal5bit(((newword >> 3 ) & 0x1E ) | ((newword >> 1) & 0x01));
// Scroll 0
- if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x1e00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x1e00/2) && (offset <= 0x1fff/2) ) { palette_set_color(machine(), 0x000 + offset - 0x1e00/2, rgb_t(r,g,b) ); return;}
// Scroll 2
- if ( (offset >= 0x4e00/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine(), 0x100 + offset - 0x4e00/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x4e00/2) && (offset <= 0x4fff/2) ) { palette_set_color(machine(), 0x100 + offset - 0x4e00/2, rgb_t(r,g,b) ); return;}
// Sprites
- if ( (offset >= 0x3000/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x3000/2, MAKE_RGB(r,g,b) ); return;}
+ if ( (offset >= 0x3000/2) && (offset <= 0x3fff/2) ) { palette_set_color(machine(), 0x200 + offset - 0x3000/2, rgb_t(r,g,b) ); return;}
}
diff --git a/src/mame/drivers/clayshoo.c b/src/mame/drivers/clayshoo.c
index af5bf7f5b6d..6f26965f05e 100644
--- a/src/mame/drivers/clayshoo.c
+++ b/src/mame/drivers/clayshoo.c
@@ -201,7 +201,7 @@ UINT32 clayshoo_state::screen_update_clayshoo(screen_device &screen, bitmap_rgb3
for (i = 0; i < 8; i++)
{
- pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
+ pen_t pen = (data & 0x80) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x) = pen;
data = data << 1;
diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c
index cf8bdc50f2a..9ecdb26dbaf 100644
--- a/src/mame/drivers/cntsteer.c
+++ b/src/mame/drivers/cntsteer.c
@@ -129,7 +129,7 @@ PALETTE_INIT_MEMBER(cntsteer_state,zerotrgt)
bit2 = (color_prom[i + 256] >> 2) & 0x01;
b = (0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2);
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/cobra.c b/src/mame/drivers/cobra.c
index e0c5b5902b6..5d374cf7840 100644
--- a/src/mame/drivers/cobra.c
+++ b/src/mame/drivers/cobra.c
@@ -800,7 +800,7 @@ rgb_t cobra_renderer::texture_fetch(UINT32 *texture, int u, int v, int width, in
int g = (texel & 0x0f00) >> 4;
int b = (texel & 0x00f0) >> 0;
int a = (texel & 0x000f) | ((texel & 0x000f) << 4);
- color = MAKE_ARGB(a, r, g, b);
+ color = rgb_t(a, r, g, b);
}
else
{
@@ -808,7 +808,7 @@ rgb_t cobra_renderer::texture_fetch(UINT32 *texture, int u, int v, int width, in
int g = (texel & 0x07c0) >> 3;
int b = (texel & 0x003e) << 2;
int a = (texel & 0x0001) ? 0xff : 0;
- color = MAKE_ARGB(a, r, g, b);
+ color = rgb_t(a, r, g, b);
}
return color;
@@ -886,7 +886,7 @@ void cobra_renderer::render_texture_scan(INT32 scanline, const extent_t &extent,
#endif
- int a = RGB_ALPHA(texel);
+ int a = texel.a();
if (a != 0 || !alpha_test)
{
@@ -894,9 +894,9 @@ void cobra_renderer::render_texture_scan(INT32 scanline, const extent_t &extent,
UINT32 goug = (int)(gg);
UINT32 goub = (int)(gb);
- int r = (RGB_RED(texel) * gour) >> 8;
- int g = (RGB_GREEN(texel) * goug) >> 8;
- int b = (RGB_BLUE(texel) * goub) >> 8;
+ int r = (texel.r() * gour) >> 8;
+ int g = (texel.g() * goug) >> 8;
+ int b = (texel.b() * goub) >> 8;
if (a != 0xff)
{
diff --git a/src/mame/drivers/coinmvga.c b/src/mame/drivers/coinmvga.c
index 0f1846502bd..3d19f0edd0f 100644
--- a/src/mame/drivers/coinmvga.c
+++ b/src/mame/drivers/coinmvga.c
@@ -315,7 +315,7 @@ WRITE16_MEMBER(coinmvga_state::ramdac_bg_w)
break;
case 2:
m_bgpal.b = ((data & 0x3f) << 2) | ((data & 0x30) >> 4);
- palette_set_color(machine(), m_bgpal.offs, MAKE_RGB(m_bgpal.r, m_bgpal.g, m_bgpal.b));
+ palette_set_color(machine(), m_bgpal.offs, rgb_t(m_bgpal.r, m_bgpal.g, m_bgpal.b));
m_bgpal.offs_internal = 0;
m_bgpal.offs++;
break;
@@ -345,7 +345,7 @@ WRITE16_MEMBER(coinmvga_state::ramdac_fg_w)
break;
case 2:
m_fgpal.b = ((data & 0x3f) << 2) | ((data & 0x30) >> 4);
- palette_set_color(machine(), 0x100+m_fgpal.offs, MAKE_RGB(m_fgpal.r, m_fgpal.g, m_fgpal.b));
+ palette_set_color(machine(), 0x100+m_fgpal.offs, rgb_t(m_fgpal.r, m_fgpal.g, m_fgpal.b));
m_fgpal.offs_internal = 0;
m_fgpal.offs++;
break;
diff --git a/src/mame/drivers/coolpool.c b/src/mame/drivers/coolpool.c
index fdc425b0d96..3c2edf08c78 100644
--- a/src/mame/drivers/coolpool.c
+++ b/src/mame/drivers/coolpool.c
@@ -71,7 +71,7 @@ static void amerdart_scanline(screen_device &screen, bitmap_rgb32 &bitmap, int s
for (x = 0; x < 16; x++)
{
UINT16 pal = state->m_vram_base[x];
- pens[x] = MAKE_RGB(pal4bit(pal >> 4), pal4bit(pal >> 8), pal4bit(pal >> 12));
+ pens[x] = rgb_t(pal4bit(pal >> 4), pal4bit(pal >> 8), pal4bit(pal >> 12));
}
for (x = params->heblnk; x < params->hsblnk; x += 4)
diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c
index 182ac3b8ad3..d9956224808 100644
--- a/src/mame/drivers/coolridr.c
+++ b/src/mame/drivers/coolridr.c
@@ -780,7 +780,7 @@ void coolridr_state::draw_bg_coolridr(bitmap_ind16 &bitmap, const rectangle &cli
bg_r = (((m_pen_fill[which] >> 16) & 0x7f) << 1) | (((m_pen_fill[which] >> 16) & 0x80) >> 7);
bg_g = (((m_pen_fill[which] >> 8) & 0x7f) << 1) | (((m_pen_fill[which] >> 8) & 0x80) >> 7);
bg_b = (((m_pen_fill[which] >> 0) & 0x7f) << 1) | (((m_pen_fill[which] >> 0) & 0x80) >> 7);
- bitmap.fill(MAKE_ARGB(0xff,bg_r,bg_g,bg_b),cliprect);
+ bitmap.fill(rgb_t(0xff,bg_r,bg_g,bg_b),cliprect);
#endif
bg_r = (((m_pen_fill[which] >> 16) & 0x78) >> 2) | (((m_pen_fill[which] >> 16) & 0x80) >> 7);
diff --git a/src/mame/drivers/copsnrob.c b/src/mame/drivers/copsnrob.c
index 8533bccf995..31ca451b720 100644
--- a/src/mame/drivers/copsnrob.c
+++ b/src/mame/drivers/copsnrob.c
@@ -68,8 +68,8 @@ Added Dip locations according to manual.
void copsnrob_state::palette_init()
{
- palette_set_color(machine(),0,MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine(),1,MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(),0,rgb_t(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(),1,rgb_t(0xff,0xff,0xff)); /* white */
}
diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c
index 4a8feb5a022..54f6448f75e 100644
--- a/src/mame/drivers/corona.c
+++ b/src/mame/drivers/corona.c
@@ -384,7 +384,7 @@ void corona_state::palette_init()
bit1 = (color_prom[0] >> 5) & 0x01;
r = 0x0e * bit6 + 0x1f * bit7 + 0x43 * bit0 + 0x8f * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c
index 6e425c7a81a..574ba160935 100644
--- a/src/mame/drivers/cps3.c
+++ b/src/mame/drivers/cps3.c
@@ -889,7 +889,7 @@ void cps3_state::cps3_set_mame_colours(int colournum, UINT16 data, UINT32 fadeva
m_mame_colours[colournum] = (r << (16+3)) | (g << (8+3)) | (b << (0+3));
- if (colournum<0x10000) palette_set_color(machine(),colournum,m_mame_colours[colournum]/* MAKE_RGB(r<<3,g<<3,b<<3)*/);//m_mame_colours[colournum]);
+ if (colournum<0x10000) palette_set_color(machine(),colournum,m_mame_colours[colournum]/* rgb_t(r<<3,g<<3,b<<3)*/);//m_mame_colours[colournum]);
}
diff --git a/src/mame/drivers/cshooter.c b/src/mame/drivers/cshooter.c
index 4e9f35d1592..8d83f96af91 100644
--- a/src/mame/drivers/cshooter.c
+++ b/src/mame/drivers/cshooter.c
@@ -201,7 +201,7 @@ UINT32 cshooter_state::screen_update_airraid(screen_device &screen, bitmap_ind16
int g = m_generic_paletteram_8[i] >> 4;
int b = m_generic_paletteram2_8[i] & 0xf;
- rgb_t color = MAKE_RGB(pal4bit(r), pal4bit(g), pal4bit(b));
+ rgb_t color = rgb_t(pal4bit(r), pal4bit(g), pal4bit(b));
colortable_palette_set_color(machine().colortable, i, color);
}
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index 67e0db77378..b52764609bb 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -110,7 +110,7 @@ void cubeqst_state::palette_init()
r = (i >> 8) & 7;
y = ((i >> 12) & 0xf) * 2;
- m_colormap[i] = MAKE_ARGB(a ? 0 : 255, y*r, y*g, y*b);
+ m_colormap[i] = rgb_t(a ? 0 : 255, y*r, y*g, y*b);
}
}
diff --git a/src/mame/drivers/cyclemb.c b/src/mame/drivers/cyclemb.c
index 10a86b54d84..0dc2baf33a7 100644
--- a/src/mame/drivers/cyclemb.c
+++ b/src/mame/drivers/cyclemb.c
@@ -157,7 +157,7 @@ void cyclemb_state::palette_init()
bit2 = (val >> 2) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c
index 25b92f05f76..afb4a96b508 100644
--- a/src/mame/drivers/dacholer.c
+++ b/src/mame/drivers/dacholer.c
@@ -643,7 +643,7 @@ void dacholer_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/dai3wksi.c b/src/mame/drivers/dai3wksi.c
index e46b1a92b58..273e645b10f 100644
--- a/src/mame/drivers/dai3wksi.c
+++ b/src/mame/drivers/dai3wksi.c
@@ -138,7 +138,7 @@ static void dai3wksi_get_pens(pen_t *pens)
for (i = 0; i <= 7; i++)
{
- pens[i] = MAKE_RGB(pal1bit(i >> 1), pal1bit(i >> 2), pal1bit(i >> 0));
+ pens[i] = rgb_t(pal1bit(i >> 1), pal1bit(i >> 2), pal1bit(i >> 0));
}
}
diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c
index 4bf801b6339..5cbea4f8a2a 100644
--- a/src/mame/drivers/ddayjlc.c
+++ b/src/mame/drivers/ddayjlc.c
@@ -506,7 +506,7 @@ void ddayjlc_state::palette_init()
bit2 = (val >> 2) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c
index 53a41dbc5cd..6bdd2208f92 100644
--- a/src/mame/drivers/deco156.c
+++ b/src/mame/drivers/deco156.c
@@ -126,7 +126,7 @@ WRITE32_MEMBER(deco156_state::deco156_nonbuffered_palette_w)
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
r = (m_generic_paletteram_32[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
READ32_MEMBER(deco156_state::wcvol95_pf1_rowscroll_r){ return m_pf1_rowscroll[offset] ^ 0xffff0000; }
diff --git a/src/mame/drivers/destroyr.c b/src/mame/drivers/destroyr.c
index 801cde32832..e06c45fc668 100644
--- a/src/mame/drivers/destroyr.c
+++ b/src/mame/drivers/destroyr.c
@@ -450,14 +450,14 @@ GFXDECODE_END
void destroyr_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x00, 0x00, 0x00)); /* major objects */
- palette_set_color(machine(), 1, MAKE_RGB(0x50, 0x50, 0x50));
- palette_set_color(machine(), 2, MAKE_RGB(0xAF, 0xAF, 0xAF));
- palette_set_color(machine(), 3, MAKE_RGB(0xFF ,0xFF, 0xFF));
- palette_set_color(machine(), 4, MAKE_RGB(0x00, 0x00, 0x00)); /* alpha numerics, waves, minor objects */
- palette_set_color(machine(), 5, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 6, MAKE_RGB(0x00, 0x00, 0x00)); /* cursor */
- palette_set_color(machine(), 7, MAKE_RGB(0x78, 0x78, 0x78));
+ palette_set_color(machine(), 0, rgb_t(0x00, 0x00, 0x00)); /* major objects */
+ palette_set_color(machine(), 1, rgb_t(0x50, 0x50, 0x50));
+ palette_set_color(machine(), 2, rgb_t(0xAF, 0xAF, 0xAF));
+ palette_set_color(machine(), 3, rgb_t(0xFF ,0xFF, 0xFF));
+ palette_set_color(machine(), 4, rgb_t(0x00, 0x00, 0x00)); /* alpha numerics, waves, minor objects */
+ palette_set_color(machine(), 5, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 6, rgb_t(0x00, 0x00, 0x00)); /* cursor */
+ palette_set_color(machine(), 7, rgb_t(0x78, 0x78, 0x78));
}
diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c
index b088f742e5d..70c8d783229 100644
--- a/src/mame/drivers/discoboy.c
+++ b/src/mame/drivers/discoboy.c
@@ -168,7 +168,7 @@ UINT32 discoboy_state::screen_update_discoboy(screen_device &screen, bitmap_ind1
g = ((pal >> 4) & 0xf) << 4;
r = ((pal >> 8) & 0xf) << 4;
- palette_set_color(machine(), i / 2, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i / 2, rgb_t(r, g, b));
}
for (i = 0; i < 0x800; i += 2)
@@ -181,7 +181,7 @@ UINT32 discoboy_state::screen_update_discoboy(screen_device &screen, bitmap_ind1
g = ((pal >> 4) & 0xf) << 4;
r = ((pal >> 8) & 0xf) << 4;
- palette_set_color(machine(), (i / 2) + 0x400, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), (i / 2) + 0x400, rgb_t(r, g, b));
}
bitmap.fill(0x3ff, cliprect);
diff --git a/src/mame/drivers/djmain.c b/src/mame/drivers/djmain.c
index 2cf6e68eeb5..21dee24f4d6 100644
--- a/src/mame/drivers/djmain.c
+++ b/src/mame/drivers/djmain.c
@@ -95,7 +95,7 @@ WRITE32_MEMBER(djmain_state::paletteram32_w)
g = (data >> 8) & 0xff;
b = (data >> 16) & 0xff;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
diff --git a/src/mame/drivers/dlair.c b/src/mame/drivers/dlair.c
index 77112ded61d..a29d0d63b5a 100644
--- a/src/mame/drivers/dlair.c
+++ b/src/mame/drivers/dlair.c
@@ -224,7 +224,7 @@ PALETTE_INIT_MEMBER(dlair_state,dleuro)
for (i = 0; i < 8; i++)
{
- palette_set_color(machine(), 2 * i + 0, MAKE_RGB(0, 0, 0));
+ palette_set_color(machine(), 2 * i + 0, rgb_t(0, 0, 0));
palette_set_color_rgb(machine(), 2 * i + 1, pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
}
}
diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c
index a177056c51a..87b07fb225b 100644
--- a/src/mame/drivers/dmndrby.c
+++ b/src/mame/drivers/dmndrby.c
@@ -493,7 +493,7 @@ void dmndrby_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/drivers/dorachan.c b/src/mame/drivers/dorachan.c
index 9430e1aae02..b437335d662 100644
--- a/src/mame/drivers/dorachan.c
+++ b/src/mame/drivers/dorachan.c
@@ -78,7 +78,7 @@ static void get_pens(pen_t *pens)
for (i = 0; i < NUM_PENS; i++)
{
- pens[i] = MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0));
+ pens[i] = rgb_t(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0));
}
}
@@ -113,7 +113,7 @@ UINT32 dorachan_state::screen_update_dorachan(screen_device &screen, bitmap_rgb3
for (i = 0; i < 8; i++)
{
- UINT8 color = (data & 0x01) ? fore_color : RGB_BLACK;
+ UINT8 color = (data & 0x01) ? fore_color : 0;
bitmap.pix32(y, x) = pens[color];
data = data >> 1;
diff --git a/src/mame/drivers/dotrikun.c b/src/mame/drivers/dotrikun.c
index 31906749e9d..e0bce462d56 100644
--- a/src/mame/drivers/dotrikun.c
+++ b/src/mame/drivers/dotrikun.c
@@ -69,8 +69,8 @@ UINT32 dotrikun_state::screen_update_dotrikun(screen_device &screen, bitmap_rgb3
{
int x,y,i;
- pen_t back_pen = MAKE_RGB(pal1bit(m_color >> 3), pal1bit(m_color >> 4), pal1bit(m_color >> 5));
- pen_t fore_pen = MAKE_RGB(pal1bit(m_color >> 0), pal1bit(m_color >> 1), pal1bit(m_color >> 2));
+ pen_t back_pen = rgb_t(pal1bit(m_color >> 3), pal1bit(m_color >> 4), pal1bit(m_color >> 5));
+ pen_t fore_pen = rgb_t(pal1bit(m_color >> 0), pal1bit(m_color >> 1), pal1bit(m_color >> 2));
for(y = (cliprect.min_y & ~1); y < cliprect.max_y; y+=2)
{
diff --git a/src/mame/drivers/dragrace.c b/src/mame/drivers/dragrace.c
index 1743e94cbe7..247a97b4705 100644
--- a/src/mame/drivers/dragrace.c
+++ b/src/mame/drivers/dragrace.c
@@ -289,22 +289,22 @@ GFXDECODE_END
void dragrace_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0xFF, 0xFF, 0xFF)); /* 2 color tiles */
- palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 2, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 3, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 4, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 5, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 6, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 7, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 8, MAKE_RGB(0xFF, 0xFF, 0xFF)); /* 4 color tiles */
- palette_set_color(machine(), 9, MAKE_RGB(0xB0, 0xB0, 0xB0));
- palette_set_color(machine(), 10,MAKE_RGB(0x5F, 0x5F, 0x5F));
- palette_set_color(machine(), 11,MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 12,MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 13,MAKE_RGB(0x5F, 0x5F, 0x5F));
- palette_set_color(machine(), 14,MAKE_RGB(0xB0, 0xB0, 0xB0));
- palette_set_color(machine(), 15,MAKE_RGB(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 0, rgb_t(0xFF, 0xFF, 0xFF)); /* 2 color tiles */
+ palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 2, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 3, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 4, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 5, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 6, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 7, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 8, rgb_t(0xFF, 0xFF, 0xFF)); /* 4 color tiles */
+ palette_set_color(machine(), 9, rgb_t(0xB0, 0xB0, 0xB0));
+ palette_set_color(machine(), 10,rgb_t(0x5F, 0x5F, 0x5F));
+ palette_set_color(machine(), 11,rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 12,rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 13,rgb_t(0x5F, 0x5F, 0x5F));
+ palette_set_color(machine(), 14,rgb_t(0xB0, 0xB0, 0xB0));
+ palette_set_color(machine(), 15,rgb_t(0x00, 0x00, 0x00));
}
diff --git a/src/mame/drivers/drw80pkr.c b/src/mame/drivers/drw80pkr.c
index 0b35eb159b7..451ed646f08 100644
--- a/src/mame/drivers/drw80pkr.c
+++ b/src/mame/drivers/drw80pkr.c
@@ -374,7 +374,7 @@ void drw80pkr_state::palette_init()
tb = 0xf0 - (0xf0 * ((color_prom[j] >> 2) & 0x01));
b = tb - (i * (tb / 5));
- palette_set_color(machine(), j, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), j, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/dwarfd.c b/src/mame/drivers/dwarfd.c
index 26ad5af22ed..890be89c016 100644
--- a/src/mame/drivers/dwarfd.c
+++ b/src/mame/drivers/dwarfd.c
@@ -989,12 +989,12 @@ void dwarfd_state::palette_init()
int b = machine().rand()|0x80;
if (i == 0) r = g = b = 0;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
- palette_set_color(machine(), 8, MAKE_RGB(255, 255, 0));
- palette_set_color(machine(), 12, MAKE_RGB(127, 127, 255));
- palette_set_color(machine(), 4, MAKE_RGB(0, 255, 0));
- palette_set_color(machine(), 6, MAKE_RGB(255, 0, 0));
+ palette_set_color(machine(), 8, rgb_t(255, 255, 0));
+ palette_set_color(machine(), 12, rgb_t(127, 127, 255));
+ palette_set_color(machine(), 4, rgb_t(0, 255, 0));
+ palette_set_color(machine(), 6, rgb_t(255, 0, 0));
}
static const ay8910_interface ay8910_config =
diff --git a/src/mame/drivers/embargo.c b/src/mame/drivers/embargo.c
index cecb1208dee..30d39b4dd6b 100644
--- a/src/mame/drivers/embargo.c
+++ b/src/mame/drivers/embargo.c
@@ -55,7 +55,7 @@ UINT32 embargo_state::screen_update_embargo(screen_device &screen, bitmap_rgb32
for (i = 0; i < 8; i++)
{
- pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
+ pen_t pen = (data & 0x01) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x) = pen;
data = data >> 1;
diff --git a/src/mame/drivers/enigma2.c b/src/mame/drivers/enigma2.c
index d076473268b..96369bf7899 100644
--- a/src/mame/drivers/enigma2.c
+++ b/src/mame/drivers/enigma2.c
@@ -205,7 +205,7 @@ void enigma2_state::get_pens(pen_t *pens)
for (i = 0; i < NUM_PENS; i++)
{
/* this color gun arrengement is supported by the flyer screenshot */
- pens[i] = MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0));
+ pens[i] = rgb_t(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0));
}
}
@@ -334,7 +334,7 @@ UINT32 enigma2_state::screen_update_enigma2a(screen_device &screen, bitmap_rgb32
video_data = video_data >> 1;
}
- pen = bit ? RGB_WHITE : RGB_BLACK;
+ pen = bit ? rgb_t::white : rgb_t::black;
bitmap.pix32(bitmap_y, x) = pen;
/* next pixel */
diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c
index 063709fc0b2..d9edbc83801 100644
--- a/src/mame/drivers/eolith16.c
+++ b/src/mame/drivers/eolith16.c
@@ -158,7 +158,7 @@ PALETTE_INIT_MEMBER(eolith16_state,eolith16)
bit1 = (c >> 7) & 0x01;
b = 0x55 * bit0 + 0xaa * bit1;
- palette_set_color(machine(),c,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),c,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/esh.c b/src/mame/drivers/esh.c
index af9d1bf37bc..53fb01981cd 100644
--- a/src/mame/drivers/esh.c
+++ b/src/mame/drivers/esh.c
@@ -269,11 +269,11 @@ void esh_state::palette_init()
bit2 = (color_prom[i+0x100] >> 6) & 0x01;
b = (0x97 * bit2) + (0x47 * bit1) + (0x21 * bit0);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
/* make color 0 transparent */
- palette_set_color(machine(), 0, MAKE_ARGB(0,0,0,0));
+ palette_set_color(machine(), 0, rgb_t(0,0,0,0));
}
static const gfx_layout esh_gfx_layout =
diff --git a/src/mame/drivers/ettrivia.c b/src/mame/drivers/ettrivia.c
index 12d4ca71804..6ca896618be 100644
--- a/src/mame/drivers/ettrivia.c
+++ b/src/mame/drivers/ettrivia.c
@@ -254,7 +254,7 @@ void ettrivia_state::palette_init()
bit1 = (color_prom[i+0x100] >> 1) & 0x01;
b = combine_2_weights(weights, bit0, bit1);
- palette_set_color(machine(), BITSWAP8(i,5,7,6,2,1,0,4,3), MAKE_RGB(r, g, b));
+ palette_set_color(machine(), BITSWAP8(i,5,7,6,2,1,0,4,3), rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c
index d9c5d374944..cc3dac07410 100644
--- a/src/mame/drivers/fcrash.c
+++ b/src/mame/drivers/fcrash.c
@@ -571,7 +571,7 @@ void cps_state::fcrash_build_palette()
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
- palette_set_color (machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color (machine(), offset, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/feversoc.c b/src/mame/drivers/feversoc.c
index ed4fff539f3..0b6ed15238c 100644
--- a/src/mame/drivers/feversoc.c
+++ b/src/mame/drivers/feversoc.c
@@ -135,13 +135,13 @@ WRITE32_MEMBER(feversoc_state::fs_paletteram_w)
g = ((m_generic_paletteram_32[offset] & 0x03e00000)>>16) >> 2;
b = ((m_generic_paletteram_32[offset] & 0x7c000000)>>16) >> 7;
- palette_set_color(machine(),offset*2+0,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset*2+0,rgb_t(r,g,b));
r = (m_generic_paletteram_32[offset] & 0x001f) << 3;
g = (m_generic_paletteram_32[offset] & 0x03e0) >> 2;
b = (m_generic_paletteram_32[offset] & 0x7c00) >> 7;
- palette_set_color(machine(),offset*2+1,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset*2+1,rgb_t(r,g,b));
}
READ32_MEMBER(feversoc_state::in0_r)
diff --git a/src/mame/drivers/fgoal.c b/src/mame/drivers/fgoal.c
index 2ef7bb18421..e123d95ea03 100644
--- a/src/mame/drivers/fgoal.c
+++ b/src/mame/drivers/fgoal.c
@@ -59,8 +59,8 @@ void fgoal_state::palette_init()
for (i = 0; i < 8; i++)
{
- palette_set_color(machine(), 128 + 0*8 + i, MAKE_RGB(0x2e,0x80,0x2e));
- palette_set_color(machine(), 128 + 1*8 + i, MAKE_RGB(0x2e,0x2e,0x2e));
+ palette_set_color(machine(), 128 + 0*8 + i, rgb_t(0x2e,0x80,0x2e));
+ palette_set_color(machine(), 128 + 1*8 + i, rgb_t(0x2e,0x2e,0x2e));
}
/* ball is a fixed color */
diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c
index 8a8510b1df9..2e467115728 100644
--- a/src/mame/drivers/firefox.c
+++ b/src/mame/drivers/firefox.c
@@ -273,7 +273,7 @@ void firefox_state::set_rgba( int start, int index, unsigned char *palette_ram )
int b = palette_ram[ index + 512 ];
int a = ( b & 3 ) * 0x55;
- palette_set_color( machine(), start + index, MAKE_ARGB( a, r, g, b ) );
+ palette_set_color( machine(), start + index, rgb_t( a, r, g, b ) );
}
WRITE8_MEMBER(firefox_state::tile_palette_w)
diff --git a/src/mame/drivers/flyball.c b/src/mame/drivers/flyball.c
index d00a084fcb1..8b68061b8e2 100644
--- a/src/mame/drivers/flyball.c
+++ b/src/mame/drivers/flyball.c
@@ -388,10 +388,10 @@ GFXDECODE_END
void flyball_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x3F, 0x3F, 0x3F)); /* tiles, ball */
- palette_set_color(machine(), 1, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 2, MAKE_RGB(0xFF ,0xFF, 0xFF)); /* sprites */
- palette_set_color(machine(), 3, MAKE_RGB(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 0, rgb_t(0x3F, 0x3F, 0x3F)); /* tiles, ball */
+ palette_set_color(machine(), 1, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 2, rgb_t(0xFF ,0xFF, 0xFF)); /* sprites */
+ palette_set_color(machine(), 3, rgb_t(0x00, 0x00, 0x00));
}
diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c
index ed27a13f3c3..8ba05ee1704 100644
--- a/src/mame/drivers/fortecar.c
+++ b/src/mame/drivers/fortecar.c
@@ -431,7 +431,7 @@ R = 82 Ohms Pull Down.
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/fresh.c b/src/mame/drivers/fresh.c
index 4f1a8c87a58..75b75ae6f9d 100644
--- a/src/mame/drivers/fresh.c
+++ b/src/mame/drivers/fresh.c
@@ -154,7 +154,7 @@ void fresh_state::update_palette( int offset )
UINT16 pal1 = m_paletteram_1[offset];
UINT8 pal2 = m_paletteram_2[offset];
- palette_set_color(machine(),offset,MAKE_RGB(pal1&0xff,(pal1>>8)&0xff,pal2));
+ palette_set_color(machine(),offset,rgb_t(pal1&0xff,(pal1>>8)&0xff,pal2));
}
WRITE16_MEMBER(fresh_state::fresh_paletteram_1_w)
diff --git a/src/mame/drivers/gal3.c b/src/mame/drivers/gal3.c
index cea7f79d683..ee65bdae491 100644
--- a/src/mame/drivers/gal3.c
+++ b/src/mame/drivers/gal3.c
@@ -189,7 +189,7 @@ void gal3_state::update_palette( )
g = data1&0xff;
b = data2&0xff;
- palette_set_color( machine(),i, MAKE_RGB(r,g,b) );
+ palette_set_color( machine(),i, rgb_t(r,g,b) );
}
} /* update_palette */
diff --git a/src/mame/drivers/galgame.c b/src/mame/drivers/galgame.c
index de3cc2c2dfb..8219b3039fd 100644
--- a/src/mame/drivers/galgame.c
+++ b/src/mame/drivers/galgame.c
@@ -293,8 +293,8 @@ ADDRESS_MAP_END
void galaxygame_state::palette_init()
{
- palette_set_color(machine(),0,RGB_BLACK); /* black */
- palette_set_color(machine(),1,RGB_WHITE); /* white */
+ palette_set_color(machine(),0,rgb_t::black); /* black */
+ palette_set_color(machine(),1,rgb_t::white); /* white */
}
IRQ_CALLBACK_MEMBER(galaxygame_state::galaxygame_irq_callback)
diff --git a/src/mame/drivers/gamecstl.c b/src/mame/drivers/gamecstl.c
index bc4ec99201f..8d69b666bfa 100644
--- a/src/mame/drivers/gamecstl.c
+++ b/src/mame/drivers/gamecstl.c
@@ -99,10 +99,10 @@ public:
static const rgb_t cga_palette[16] =
{
- MAKE_RGB( 0x00, 0x00, 0x00 ), MAKE_RGB( 0x00, 0x00, 0xaa ), MAKE_RGB( 0x00, 0xaa, 0x00 ), MAKE_RGB( 0x00, 0xaa, 0xaa ),
- MAKE_RGB( 0xaa, 0x00, 0x00 ), MAKE_RGB( 0xaa, 0x00, 0xaa ), MAKE_RGB( 0xaa, 0x55, 0x00 ), MAKE_RGB( 0xaa, 0xaa, 0xaa ),
- MAKE_RGB( 0x55, 0x55, 0x55 ), MAKE_RGB( 0x55, 0x55, 0xff ), MAKE_RGB( 0x55, 0xff, 0x55 ), MAKE_RGB( 0x55, 0xff, 0xff ),
- MAKE_RGB( 0xff, 0x55, 0x55 ), MAKE_RGB( 0xff, 0x55, 0xff ), MAKE_RGB( 0xff, 0xff, 0x55 ), MAKE_RGB( 0xff, 0xff, 0xff ),
+ rgb_t( 0x00, 0x00, 0x00 ), rgb_t( 0x00, 0x00, 0xaa ), rgb_t( 0x00, 0xaa, 0x00 ), rgb_t( 0x00, 0xaa, 0xaa ),
+ rgb_t( 0xaa, 0x00, 0x00 ), rgb_t( 0xaa, 0x00, 0xaa ), rgb_t( 0xaa, 0x55, 0x00 ), rgb_t( 0xaa, 0xaa, 0xaa ),
+ rgb_t( 0x55, 0x55, 0x55 ), rgb_t( 0x55, 0x55, 0xff ), rgb_t( 0x55, 0xff, 0x55 ), rgb_t( 0x55, 0xff, 0xff ),
+ rgb_t( 0xff, 0x55, 0x55 ), rgb_t( 0xff, 0x55, 0xff ), rgb_t( 0xff, 0xff, 0x55 ), rgb_t( 0xff, 0xff, 0xff ),
};
void gamecstl_state::video_start()
diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c
index 6b9fd1397a6..5b635bcd6a2 100644
--- a/src/mame/drivers/gei.c
+++ b/src/mame/drivers/gei.c
@@ -179,7 +179,7 @@ void gei_state::palette_init()
for (i = 0; i < 8; i++ )
{
- palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 2), pal1bit(i), pal1bit(i >> 1)));
+ palette_set_color(machine(), i, rgb_t(pal1bit(i >> 2), pal1bit(i), pal1bit(i >> 1)));
}
}
@@ -189,7 +189,7 @@ PALETTE_INIT_MEMBER(gei_state,quizvid)
for (i = 0; i < 8; i++ )
{
- palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 1), pal1bit(i), pal1bit(i >> 2)));
+ palette_set_color(machine(), i, rgb_t(pal1bit(i >> 1), pal1bit(i), pal1bit(i >> 2)));
}
}
diff --git a/src/mame/drivers/gluck2.c b/src/mame/drivers/gluck2.c
index ff0478d811e..1d97c93e149 100644
--- a/src/mame/drivers/gluck2.c
+++ b/src/mame/drivers/gluck2.c
@@ -303,7 +303,7 @@ PALETTE_INIT_MEMBER(gluck2_state, gluck2)
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c
index b64dac70135..6f1bb51f285 100644
--- a/src/mame/drivers/goldnpkr.c
+++ b/src/mame/drivers/goldnpkr.c
@@ -1190,7 +1190,7 @@ void goldnpkr_state::palette_init()
b = (bit2 * intenmin) + (inten * (bit2 * (intenmax - intenmin)));
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -1238,7 +1238,7 @@ PALETTE_INIT_MEMBER(goldnpkr_state,witchcrd)
bit2 = (color_prom[i] >> 2) & 0x01;
b = bk * (bit2 * 0xff);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -1284,7 +1284,7 @@ PALETTE_INIT_MEMBER(goldnpkr_state,wcrdxtnd)
//if ((b == 0) & (bk = 1)) --> needs better implementation
// b = 0x3f;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/goldstar.c b/src/mame/drivers/goldstar.c
index 9fe9df4b3e1..34ad4ecd8be 100644
--- a/src/mame/drivers/goldstar.c
+++ b/src/mame/drivers/goldstar.c
@@ -6340,7 +6340,7 @@ PALETTE_INIT_MEMBER(goldstar_state,cmast91)
g = proms[0x100 + i] << 4;
r = proms[0x200 + i] << 4;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -6737,7 +6737,7 @@ PALETTE_INIT_MEMBER(goldstar_state,magodds)
g = proms[0x100 + i] << 4;
r = proms[0x200 + i] << 4;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/gpworld.c b/src/mame/drivers/gpworld.c
index b0036aad603..84b544da78c 100644
--- a/src/mame/drivers/gpworld.c
+++ b/src/mame/drivers/gpworld.c
@@ -307,7 +307,7 @@ WRITE8_MEMBER(gpworld_state::palette_write)
/* logerror("PAL WRITE index : %x rgb : %d %d %d (real %x) at %x\n", pal_index, r,g,b, data, offset); */
- palette_set_color(machine(), (pal_index & 0xffe) >> 1, MAKE_ARGB(a, r, g, b));
+ palette_set_color(machine(), (pal_index & 0xffe) >> 1, rgb_t(a, r, g, b));
}
/* PROGRAM MAP */
diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c
index 3851ad685cc..9e5f726cf81 100644
--- a/src/mame/drivers/groundfx.c
+++ b/src/mame/drivers/groundfx.c
@@ -88,7 +88,7 @@ WRITE32_MEMBER(groundfx_state::color_ram_w)
g = (a &0xff00) >> 8;
b = (a &0xff);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/gunpey.c b/src/mame/drivers/gunpey.c
index b437dd83e97..d465b887c5a 100644
--- a/src/mame/drivers/gunpey.c
+++ b/src/mame/drivers/gunpey.c
@@ -1412,7 +1412,7 @@ void gunpey_state::palette_init()
int i;
for (i = 0; i < 0x8000; i++)
- palette_set_color(machine(), i, MAKE_RGB( pal5bit((i >> 10)&0x1f), pal5bit(((i >> 5))&0x1f), pal5bit((i >> 0)&0x1f)));
+ palette_set_color(machine(), i, rgb_t( pal5bit((i >> 10)&0x1f), pal5bit(((i >> 5))&0x1f), pal5bit((i >> 0)&0x1f)));
}
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c
index 8d274d8b1ba..b232f4d10de 100644
--- a/src/mame/drivers/halleys.c
+++ b/src/mame/drivers/halleys.c
@@ -1130,7 +1130,7 @@ void halleys_state::palette_init()
for (count=0; count<1024; count++)
{
pal_ptr[count] = 0;
- palette_set_color(machine(), count, MAKE_RGB(0, 0, 0));
+ palette_set_color(machine(), count, rgb_t(0, 0, 0));
}
// 00-31: palette RAM(ffc0-ffdf)
@@ -1151,7 +1151,7 @@ void halleys_state::palette_init()
g = r + count + BG_MONO;
r += i;
pal_ptr[g] = d;
- palette_set_color(machine(), g, MAKE_RGB(r, r, r));
+ palette_set_color(machine(), g, rgb_t(r, r, r));
}
}
@@ -1234,13 +1234,13 @@ WRITE8_MEMBER(halleys_state::halleys_paletteram_IIRRGGBB_w)
g = d & 0x0c; g |= i; g = g<<4 | g;
b = d<<2 & 0x0c; b |= i; b = b<<4 | b;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
- palette_set_color(machine(), offset+SP_2BACK, MAKE_RGB(r, g, b));
- palette_set_color(machine(), offset+SP_ALPHA, MAKE_RGB(r, g, b));
- palette_set_color(machine(), offset+SP_COLLD, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
+ palette_set_color(machine(), offset+SP_2BACK, rgb_t(r, g, b));
+ palette_set_color(machine(), offset+SP_ALPHA, rgb_t(r, g, b));
+ palette_set_color(machine(), offset+SP_COLLD, rgb_t(r, g, b));
halleys_decode_rgb(&r, &g, &b, offset, 0);
- palette_set_color(machine(), offset+0x20, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset+0x20, rgb_t(r, g, b));
}
diff --git a/src/mame/drivers/headonb.c b/src/mame/drivers/headonb.c
index 3032a70ca1c..b592cc94133 100644
--- a/src/mame/drivers/headonb.c
+++ b/src/mame/drivers/headonb.c
@@ -64,8 +64,8 @@ public:
void headonb_state::palette_init()
{
- palette_set_color(machine(), 0, RGB_BLACK);
- palette_set_color(machine(), 1, RGB_WHITE);
+ palette_set_color(machine(), 0, rgb_t::black);
+ palette_set_color(machine(), 1, rgb_t::white);
}
TILE_GET_INFO_MEMBER(headonb_state::get_headonb_tile_info)
diff --git a/src/mame/drivers/hideseek.c b/src/mame/drivers/hideseek.c
index 136de262151..5feba86cadb 100644
--- a/src/mame/drivers/hideseek.c
+++ b/src/mame/drivers/hideseek.c
@@ -87,7 +87,7 @@ void hideseek_state::palette_init()
int i;
for (i = 0; i < 0x8000; i++)
- palette_set_color(machine(), i, MAKE_RGB( pal5bit((i >> 10)&0x1f), pal5bit(((i >> 5))&0x1f), pal5bit((i >> 0)&0x1f)));
+ palette_set_color(machine(), i, rgb_t( pal5bit((i >> 10)&0x1f), pal5bit(((i >> 5))&0x1f), pal5bit((i >> 0)&0x1f)));
}
diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c
index 891876b0054..faa2fd7577d 100644
--- a/src/mame/drivers/highvdeo.c
+++ b/src/mame/drivers/highvdeo.c
@@ -257,7 +257,7 @@ WRITE16_MEMBER(highvdeo_state::tv_vcf_paletteram_w)
break;
case 2:
m_pal.b = ((data & 0x3f) << 2) | ((data & 0x30) >> 4);
- palette_set_color(machine(), m_pal.offs, MAKE_RGB(m_pal.r, m_pal.g, m_pal.b));
+ palette_set_color(machine(), m_pal.offs, rgb_t(m_pal.r, m_pal.g, m_pal.b));
m_pal.offs_internal = 0;
m_pal.offs++;
break;
diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c
index e42acc3b573..8983d59e173 100644
--- a/src/mame/drivers/hng64.c
+++ b/src/mame/drivers/hng64.c
@@ -525,7 +525,7 @@ WRITE32_MEMBER(hng64_state::hng64_pal_w)
g = ((paletteram[offset] & 0x0000ff00) >>8);
r = ((paletteram[offset] & 0x00ff0000) >>16);
//a = ((paletteram[offset] & 0xff000000) >>24);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
READ32_MEMBER(hng64_state::hng64_sysregs_r)
diff --git a/src/mame/drivers/hotstuff.c b/src/mame/drivers/hotstuff.c
index c50532b1d25..cbe5ab2217a 100644
--- a/src/mame/drivers/hotstuff.c
+++ b/src/mame/drivers/hotstuff.c
@@ -51,7 +51,7 @@ UINT32 hotstuff_state::screen_update_hotstuff(screen_device &screen, bitmap_rgb3
{
row_palette_data[p] = m_bitmapram[count+p];
- row_palette_data_as_rgb32_pen_data[p] = MAKE_RGB( (row_palette_data[p] & 0x0f00)>>4, (row_palette_data[p] & 0x00f0)>>0, (row_palette_data[p] & 0x000f)<<4 );
+ row_palette_data_as_rgb32_pen_data[p] = rgb_t( (row_palette_data[p] & 0x0f00)>>4, (row_palette_data[p] & 0x00f0)>>0, (row_palette_data[p] & 0x000f)<<4 );
}
diff --git a/src/mame/drivers/istellar.c b/src/mame/drivers/istellar.c
index b4aa34354c3..9cb07311148 100644
--- a/src/mame/drivers/istellar.c
+++ b/src/mame/drivers/istellar.c
@@ -304,7 +304,7 @@ void istellar_state::palette_init()
bit3 = (color_prom[i+0x200] >> 3) & 0x01;
b = (0x8f * bit3) + (0x43 * bit2) + (0x1f * bit1) + (0x0e * bit0);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/itgambl2.c b/src/mame/drivers/itgambl2.c
index 89bdf01f43d..b5b4ceb5790 100644
--- a/src/mame/drivers/itgambl2.c
+++ b/src/mame/drivers/itgambl2.c
@@ -255,7 +255,7 @@ void itgambl2_state::palette_init()
r = (x & 0xf)*0x10;
g = ((x & 0x3c)>>2)*0x10;
b = ((x & 0xf0)>>4)*0x10;
- palette_set_color(machine(),x,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),x,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/itgambl3.c b/src/mame/drivers/itgambl3.c
index 0140cffac2d..90eee9555d0 100644
--- a/src/mame/drivers/itgambl3.c
+++ b/src/mame/drivers/itgambl3.c
@@ -243,7 +243,7 @@ void itgambl3_state::palette_init()
r = (x & 0xf)*0x11;
g = ((x & 0x3c)>>2)*0x11;
b = ((x & 0xf0)>>4)*0x11;
- palette_set_color(machine(),x,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),x,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c
index 2afeab268e8..36683e97468 100644
--- a/src/mame/drivers/jangou.c
+++ b/src/mame/drivers/jangou.c
@@ -149,7 +149,7 @@ void jangou_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c
index 18e458d46e7..c5c8398fbd0 100644
--- a/src/mame/drivers/jantotsu.c
+++ b/src/mame/drivers/jantotsu.c
@@ -228,7 +228,7 @@ void jantotsu_state::palette_init()
bit2 = (color_prom[0] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/jollyjgr.c b/src/mame/drivers/jollyjgr.c
index 754b3326023..fbd95f0e5c6 100644
--- a/src/mame/drivers/jollyjgr.c
+++ b/src/mame/drivers/jollyjgr.c
@@ -436,7 +436,7 @@ void jollyjgr_state::palette_init()
bit1 = BIT(*color_prom, 7);
b = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c
index 9c31adadb07..691a88c5dea 100644
--- a/src/mame/drivers/kingdrby.c
+++ b/src/mame/drivers/kingdrby.c
@@ -980,7 +980,7 @@ PALETTE_INIT_MEMBER(kingdrby_state,kingdrby)
bit2 = (color_prom[0] >> 5) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
@@ -1013,7 +1013,7 @@ PALETTE_INIT_MEMBER(kingdrby_state,kingdrbb)
bit2 = (prom[i] >> 5) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/koikoi.c b/src/mame/drivers/koikoi.c
index ae75303886e..60e10619bbc 100644
--- a/src/mame/drivers/koikoi.c
+++ b/src/mame/drivers/koikoi.c
@@ -128,7 +128,7 @@ void koikoi_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/drivers/kontest.c b/src/mame/drivers/kontest.c
index 6b32cb1b47c..523ff2657ac 100644
--- a/src/mame/drivers/kontest.c
+++ b/src/mame/drivers/kontest.c
@@ -87,7 +87,7 @@ void kontest_state::palette_init()
bit2 = (color_prom[i] >> 2) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/lazercmd.c b/src/mame/drivers/lazercmd.c
index acbb578f25f..8f3e46bc828 100644
--- a/src/mame/drivers/lazercmd.c
+++ b/src/mame/drivers/lazercmd.c
@@ -595,13 +595,13 @@ GFXDECODE_END
void lazercmd_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
- palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
+ palette_set_color(machine(), 0, rgb_t(0xb0, 0xb0, 0xb0)); /* white */
+ palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00)); /* black */
- palette_set_color(machine(), 2, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
- palette_set_color(machine(), 3, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
+ palette_set_color(machine(), 2, rgb_t(0x00, 0x00, 0x00)); /* black */
+ palette_set_color(machine(), 3, rgb_t(0xb0, 0xb0, 0xb0)); /* white */
- palette_set_color(machine(), 4, MAKE_RGB(0xff, 0xff, 0xff)); /* bright white */
+ palette_set_color(machine(), 4, rgb_t(0xff, 0xff, 0xff)); /* bright white */
}
diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c
index b384a05fcb0..b933c73c24f 100644
--- a/src/mame/drivers/lemmings.c
+++ b/src/mame/drivers/lemmings.c
@@ -56,7 +56,7 @@ WRITE16_MEMBER(lemmings_state::lemmings_palette_24bit_w)
g = (m_paletteram[offset + 1] >> 8) & 0xff;
r = (m_paletteram[offset + 1] >> 0) & 0xff;
- palette_set_color(machine(), offset / 2, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset / 2, rgb_t(r, g, b));
}
void lemmings_state::lemmings_sound_cb( address_space &space, UINT16 data, UINT16 mem_mask )
diff --git a/src/mame/drivers/lgp.c b/src/mame/drivers/lgp.c
index 4879896f949..91c798e63bc 100644
--- a/src/mame/drivers/lgp.c
+++ b/src/mame/drivers/lgp.c
@@ -107,7 +107,7 @@ UINT32 lgp_state::screen_update_lgp(screen_device &screen, bitmap_rgb32 &bitmap,
int charx, chary;
/* make color 0 transparent */
- palette_set_color(machine(), 0, MAKE_ARGB(0,0,0,0));
+ palette_set_color(machine(), 0, rgb_t(0,0,0,0));
/* clear */
bitmap.fill(0, cliprect);
diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c
index 957dbe392d5..fba464999a5 100644
--- a/src/mame/drivers/looping.c
+++ b/src/mame/drivers/looping.c
@@ -201,7 +201,7 @@ void looping_state::palette_init()
bit1 = (color_prom[i] >> 7) & 1;
b = combine_2_weights(bweights, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/m10.c b/src/mame/drivers/m10.c
index 863aa5350db..03161d81144 100644
--- a/src/mame/drivers/m10.c
+++ b/src/mame/drivers/m10.c
@@ -181,9 +181,9 @@ PALETTE_INIT_MEMBER(m10_state,m10)
rgb_t color;
if (i & 0x01)
- color = MAKE_RGB(pal1bit(~i >> 3), pal1bit(~i >> 2), pal1bit(~i >> 1));
+ color = rgb_t(pal1bit(~i >> 3), pal1bit(~i >> 2), pal1bit(~i >> 1));
else
- color = RGB_BLACK;
+ color = rgb_t::black;
palette_set_color(machine(), i, color);
}
diff --git a/src/mame/drivers/m14.c b/src/mame/drivers/m14.c
index d82a1b73d55..746027ecbae 100644
--- a/src/mame/drivers/m14.c
+++ b/src/mame/drivers/m14.c
@@ -112,9 +112,9 @@ void m14_state::palette_init()
rgb_t color;
if (i & 0x01)
- color = MAKE_RGB(pal1bit(i >> 1), pal1bit(i >> 2), pal1bit(i >> 3));
+ color = rgb_t(pal1bit(i >> 1), pal1bit(i >> 2), pal1bit(i >> 3));
else
- color = (i & 0x10) ? RGB_WHITE : RGB_BLACK;
+ color = (i & 0x10) ? rgb_t::white : rgb_t::black;
palette_set_color(machine(), i, color);
}
diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c
index 7caabbd4c86..465583936d8 100644
--- a/src/mame/drivers/m63.c
+++ b/src/mame/drivers/m63.c
@@ -228,7 +228,7 @@ PALETTE_INIT_MEMBER(m63_state,m63)
bit3 = (color_prom[i + 2*256] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
color_prom += 3 * 256;
@@ -252,7 +252,7 @@ PALETTE_INIT_MEMBER(m63_state,m63)
bit1 = (color_prom[i] >> 7) & 0x01;
b = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine(),i+256,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i+256,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/m79amb.c b/src/mame/drivers/m79amb.c
index d2257c71cec..689b89b194e 100644
--- a/src/mame/drivers/m79amb.c
+++ b/src/mame/drivers/m79amb.c
@@ -77,7 +77,7 @@ UINT32 m79amb_state::screen_update_ramtek(screen_device &screen, bitmap_rgb32 &b
for (i = 0; i < 8; i++)
{
- pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
+ pen_t pen = (data & 0x80) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x) = pen;
x++;
diff --git a/src/mame/drivers/macrossp.c b/src/mame/drivers/macrossp.c
index 1f8e91fd8c1..97766a4222b 100644
--- a/src/mame/drivers/macrossp.c
+++ b/src/mame/drivers/macrossp.c
@@ -300,7 +300,7 @@ WRITE32_MEMBER(macrossp_state::paletteram32_macrossp_w)
g = ((m_paletteram[offset] & 0x00ff0000) >>16);
r = ((m_paletteram[offset] & 0xff000000) >>24);
- palette_set_color(machine(), offset, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), offset, rgb_t(r,g,b));
}
@@ -361,7 +361,7 @@ void macrossp_state::update_colors( )
else
r -= m_fade_effect;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/magicard.c b/src/mame/drivers/magicard.c
index ffc0970a13e..ac8d2391b1d 100644
--- a/src/mame/drivers/magicard.c
+++ b/src/mame/drivers/magicard.c
@@ -522,7 +522,7 @@ WRITE16_MEMBER(magicard_state::paletteram_io_w)
break;
case 2:
m_pal.b = ((data & 0x3f) << 2) | ((data & 0x30) >> 4);
- palette_set_color(machine(), m_pal.offs, MAKE_RGB(m_pal.r, m_pal.g, m_pal.b));
+ palette_set_color(machine(), m_pal.offs, rgb_t(m_pal.r, m_pal.g, m_pal.b));
m_pal.offs_internal = 0;
m_pal.offs++;
break;
diff --git a/src/mame/drivers/magicfly.c b/src/mame/drivers/magicfly.c
index 21ce0e29081..eccd3c2e81d 100644
--- a/src/mame/drivers/magicfly.c
+++ b/src/mame/drivers/magicfly.c
@@ -568,23 +568,23 @@ PALETTE_INIT_MEMBER(magicfly_state, magicfly)
for (i = 0x00; i < 0x10; i += 0x10)
{
/* 1st gfx bank */
- palette_set_color(machine(), i + 0, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 2, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 4, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 6, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 8, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 10, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 12, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 14, MAKE_RGB(0x00, 0x00, 0x00));
-
- palette_set_color(machine(), i + 1, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 3, MAKE_RGB(0xff, 0x00, 0x00));
- palette_set_color(machine(), i + 5, MAKE_RGB(0x00, 0xff, 0x00));
- palette_set_color(machine(), i + 7, MAKE_RGB(0xff, 0xff, 0x00));
- palette_set_color(machine(), i + 9, MAKE_RGB(0x00, 0x00, 0xff));
- palette_set_color(machine(), i + 11, MAKE_RGB(0xff, 0x00, 0xff));
- palette_set_color(machine(), i + 13, MAKE_RGB(0x00, 0xff, 0xff));
- palette_set_color(machine(), i + 15, MAKE_RGB(0xff, 0xff, 0xff));
+ palette_set_color(machine(), i + 0, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 2, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 4, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 6, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 8, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 10, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 12, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 14, rgb_t(0x00, 0x00, 0x00));
+
+ palette_set_color(machine(), i + 1, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 3, rgb_t(0xff, 0x00, 0x00));
+ palette_set_color(machine(), i + 5, rgb_t(0x00, 0xff, 0x00));
+ palette_set_color(machine(), i + 7, rgb_t(0xff, 0xff, 0x00));
+ palette_set_color(machine(), i + 9, rgb_t(0x00, 0x00, 0xff));
+ palette_set_color(machine(), i + 11, rgb_t(0xff, 0x00, 0xff));
+ palette_set_color(machine(), i + 13, rgb_t(0x00, 0xff, 0xff));
+ palette_set_color(machine(), i + 15, rgb_t(0xff, 0xff, 0xff));
}
}
@@ -595,27 +595,27 @@ PALETTE_INIT_MEMBER(magicfly_state, bchance)
for (i = 0x00; i < 0x10; i += 0x10)
{
/* 1st gfx bank */
- palette_set_color(machine(), i + 0, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 2, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 4, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 6, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 8, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 10, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 12, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 14, MAKE_RGB(0x00, 0x00, 0x00));
-
- palette_set_color(machine(), i + 1, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), i + 3, MAKE_RGB(0xff, 0x00, 0x00));
- palette_set_color(machine(), i + 5, MAKE_RGB(0x00, 0xff, 0x00));
- palette_set_color(machine(), i + 7, MAKE_RGB(0xff, 0xff, 0x00));
- palette_set_color(machine(), i + 9, MAKE_RGB(0x00, 0x00, 0xff));
- palette_set_color(machine(), i + 11, MAKE_RGB(0xff, 0x00, 0xff));
- palette_set_color(machine(), i + 13, MAKE_RGB(0x00, 0xff, 0xff));
- palette_set_color(machine(), i + 15, MAKE_RGB(0xff, 0xff, 0xff));
+ palette_set_color(machine(), i + 0, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 2, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 4, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 6, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 8, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 10, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 12, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 14, rgb_t(0x00, 0x00, 0x00));
+
+ palette_set_color(machine(), i + 1, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), i + 3, rgb_t(0xff, 0x00, 0x00));
+ palette_set_color(machine(), i + 5, rgb_t(0x00, 0xff, 0x00));
+ palette_set_color(machine(), i + 7, rgb_t(0xff, 0xff, 0x00));
+ palette_set_color(machine(), i + 9, rgb_t(0x00, 0x00, 0xff));
+ palette_set_color(machine(), i + 11, rgb_t(0xff, 0x00, 0xff));
+ palette_set_color(machine(), i + 13, rgb_t(0x00, 0xff, 0xff));
+ palette_set_color(machine(), i + 15, rgb_t(0xff, 0xff, 0xff));
}
- palette_set_color(machine(), 0x08 , MAKE_RGB(0xff, 0xff, 0xff)); // white for the cards back logo background.
- palette_set_color(machine(), 0x12 , MAKE_RGB(0x00, 0x00, 0x00)); // black for the cards corners (should be transparent)
+ palette_set_color(machine(), 0x08 , rgb_t(0xff, 0xff, 0xff)); // white for the cards back logo background.
+ palette_set_color(machine(), 0x12 , rgb_t(0x00, 0x00, 0x00)); // black for the cards corners (should be transparent)
}
diff --git a/src/mame/drivers/majorpkr.c b/src/mame/drivers/majorpkr.c
index 978f51608ba..ac05aab7a9f 100644
--- a/src/mame/drivers/majorpkr.c
+++ b/src/mame/drivers/majorpkr.c
@@ -590,7 +590,7 @@ WRITE8_MEMBER(majorpkr_state::paletteram_w)
offset >>= 1;
int color = m_generic_paletteram_8[m_palette_bank * 0x800 + offset * 2] + m_generic_paletteram_8[m_palette_bank * 0x800 + offset * 2 + 1] * 256;
- palette_set_color(machine(), offset + m_palette_bank * 256 * 4, MAKE_RGB(pal5bit(color >> 5), pal5bit(color >> 10), pal5bit(color)));
+ palette_set_color(machine(), offset + m_palette_bank * 256 * 4, rgb_t(pal5bit(color >> 5), pal5bit(color >> 10), pal5bit(color)));
}
diff --git a/src/mame/drivers/marinedt.c b/src/mame/drivers/marinedt.c
index 1333090a945..d83327bc348 100644
--- a/src/mame/drivers/marinedt.c
+++ b/src/mame/drivers/marinedt.c
@@ -480,7 +480,7 @@ bit0 = 0;
// *(palette++) = 0x92 * bit0 + 0x46 * bit1 + 0x27 * bit2;
b = 0x27 * bit0 + 0x46 * bit1 + 0x92 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c
index bf7da3125cd..ffa9f3ba2ad 100644
--- a/src/mame/drivers/mazerbla.c
+++ b/src/mame/drivers/mazerbla.c
@@ -328,7 +328,7 @@ WRITE8_MEMBER(mazerbla_state::cfb_backgnd_color_w)
bit0 = BIT(data, 0);
b = combine_3_weights(m_weights_b, bit0, bit1, bit2);
- palette_set_color(machine(), 255, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), 255, rgb_t(r, g, b));
//logerror("background color (port 01) write=%02x\n",data);
}
}
@@ -674,7 +674,7 @@ READ8_MEMBER(mazerbla_state::vcu_set_clr_addr_r)
b = combine_3_weights(m_weights_b, bit0, bit1, bit2);
if ((x + y * 16) < 255)//keep color 255 free for use as background color
- palette_set_color(machine(), x + y * 16, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), x + y * 16, rgb_t(r, g, b));
m_lookup_ram[lookup_offs + x + y * 16] = colour;
}
diff --git a/src/mame/drivers/meadows.c b/src/mame/drivers/meadows.c
index bdf6cb2a03f..dc6362add9e 100644
--- a/src/mame/drivers/meadows.c
+++ b/src/mame/drivers/meadows.c
@@ -319,8 +319,8 @@ INTERRUPT_GEN_MEMBER(meadows_state::audio_interrupt)
void meadows_state::palette_init()
{
- palette_set_color(machine(), 0, RGB_BLACK);
- palette_set_color(machine(), 1, RGB_WHITE);
+ palette_set_color(machine(), 0, rgb_t::black);
+ palette_set_color(machine(), 1, rgb_t::white);
}
diff --git a/src/mame/drivers/mediagx.c b/src/mame/drivers/mediagx.c
index 3d8ca77e448..194abb14bfd 100644
--- a/src/mame/drivers/mediagx.c
+++ b/src/mame/drivers/mediagx.c
@@ -216,10 +216,10 @@ public:
static const rgb_t cga_palette[16] =
{
- MAKE_RGB( 0x00, 0x00, 0x00 ), MAKE_RGB( 0x00, 0x00, 0xaa ), MAKE_RGB( 0x00, 0xaa, 0x00 ), MAKE_RGB( 0x00, 0xaa, 0xaa ),
- MAKE_RGB( 0xaa, 0x00, 0x00 ), MAKE_RGB( 0xaa, 0x00, 0xaa ), MAKE_RGB( 0xaa, 0x55, 0x00 ), MAKE_RGB( 0xaa, 0xaa, 0xaa ),
- MAKE_RGB( 0x55, 0x55, 0x55 ), MAKE_RGB( 0x55, 0x55, 0xff ), MAKE_RGB( 0x55, 0xff, 0x55 ), MAKE_RGB( 0x55, 0xff, 0xff ),
- MAKE_RGB( 0xff, 0x55, 0x55 ), MAKE_RGB( 0xff, 0x55, 0xff ), MAKE_RGB( 0xff, 0xff, 0x55 ), MAKE_RGB( 0xff, 0xff, 0xff ),
+ rgb_t( 0x00, 0x00, 0x00 ), rgb_t( 0x00, 0x00, 0xaa ), rgb_t( 0x00, 0xaa, 0x00 ), rgb_t( 0x00, 0xaa, 0xaa ),
+ rgb_t( 0xaa, 0x00, 0x00 ), rgb_t( 0xaa, 0x00, 0xaa ), rgb_t( 0xaa, 0x55, 0x00 ), rgb_t( 0xaa, 0xaa, 0xaa ),
+ rgb_t( 0x55, 0x55, 0x55 ), rgb_t( 0x55, 0x55, 0xff ), rgb_t( 0x55, 0xff, 0x55 ), rgb_t( 0x55, 0xff, 0xff ),
+ rgb_t( 0xff, 0x55, 0x55 ), rgb_t( 0xff, 0x55, 0xff ), rgb_t( 0xff, 0xff, 0x55 ), rgb_t( 0xff, 0xff, 0xff ),
};
void mediagx_state::video_start()
diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c
index c973c91ebdb..e0670c6b6c2 100644
--- a/src/mame/drivers/meijinsn.c
+++ b/src/mame/drivers/meijinsn.c
@@ -287,7 +287,7 @@ void meijinsn_state::palette_init()
bit1 = BIT(color_prom[i], 7);
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c
index f956f1d148d..39b7b6b661f 100644
--- a/src/mame/drivers/merit.c
+++ b/src/mame/drivers/merit.c
@@ -247,7 +247,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
bit0 = BIT(i,0);
bit1 = BIT(i,1);
bit2 = BIT(i,2);
- state->m_pens[i] = MAKE_RGB(dim*bit0, dim*bit1, dim*bit2);
+ state->m_pens[i] = rgb_t(dim*bit0, dim*bit1, dim*bit2);
}
return state->m_pens;
diff --git a/src/mame/drivers/meyc8080.c b/src/mame/drivers/meyc8080.c
index a98fc7511ee..58e6c829de9 100644
--- a/src/mame/drivers/meyc8080.c
+++ b/src/mame/drivers/meyc8080.c
@@ -120,7 +120,7 @@ UINT32 meyc8080_state::screen_update_meyc8080(screen_device &screen, bitmap_rgb3
for (i = 0; i < 8; i++)
{
- bitmap.pix32(y, x) = MAKE_RGB(pal1bit(data_r >> 7), pal1bit(data_g >> 7), pal1bit(data_b >> 7));
+ bitmap.pix32(y, x) = rgb_t(pal1bit(data_r >> 7), pal1bit(data_g >> 7), pal1bit(data_b >> 7));
data_r = data_r << 1;
data_g = data_g << 1;
diff --git a/src/mame/drivers/mgolf.c b/src/mame/drivers/mgolf.c
index 42aecff94a3..3809fcf1f42 100644
--- a/src/mame/drivers/mgolf.c
+++ b/src/mame/drivers/mgolf.c
@@ -285,10 +285,10 @@ INPUT_PORTS_END
void mgolf_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x80, 0x80, 0x80));
- palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 2, MAKE_RGB(0x80, 0x80, 0x80));
- palette_set_color(machine(), 3, MAKE_RGB(0xff, 0xff, 0xff));
+ palette_set_color(machine(), 0, rgb_t(0x80, 0x80, 0x80));
+ palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 2, rgb_t(0x80, 0x80, 0x80));
+ palette_set_color(machine(), 3, rgb_t(0xff, 0xff, 0xff));
}
static const gfx_layout tile_layout =
diff --git a/src/mame/drivers/miniboy7.c b/src/mame/drivers/miniboy7.c
index 4b4b3aeeabe..cfbad3e75e9 100644
--- a/src/mame/drivers/miniboy7.c
+++ b/src/mame/drivers/miniboy7.c
@@ -265,7 +265,7 @@ void miniboy7_state::palette_init()
b = (bit2 * intenmin) + (inten * (bit2 * (intenmax - intenmin)));
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/minivadr.c b/src/mame/drivers/minivadr.c
index a1e0c0d1950..2906768be07 100644
--- a/src/mame/drivers/minivadr.c
+++ b/src/mame/drivers/minivadr.c
@@ -48,7 +48,7 @@ UINT32 minivadr_state::screen_update_minivadr(screen_device &screen, bitmap_rgb3
for (i = 0; i < 8; i++)
{
- pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
+ pen_t pen = (data & 0x80) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x) = pen;
data = data << 1;
diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c
index 85da151b037..0af5de246eb 100644
--- a/src/mame/drivers/mirax.c
+++ b/src/mame/drivers/mirax.c
@@ -169,7 +169,7 @@ void mirax_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/mogura.c b/src/mame/drivers/mogura.c
index a0cbae8aa95..d1ca233085d 100644
--- a/src/mame/drivers/mogura.c
+++ b/src/mame/drivers/mogura.c
@@ -63,7 +63,7 @@ void mogura_state::palette_init()
bit2 = BIT(color_prom[i], 7);
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), j, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), j, rgb_t(r, g, b));
j += 4;
if (j > 31) j -= 31;
}
diff --git a/src/mame/drivers/mpoker.c b/src/mame/drivers/mpoker.c
index 4f020564952..b82e4d00756 100644
--- a/src/mame/drivers/mpoker.c
+++ b/src/mame/drivers/mpoker.c
@@ -241,9 +241,9 @@ void mpoker_state::palette_init()
rgb_t color;
if (i & 0x01)
- color = MAKE_RGB(pal2bit((i & 0x6) >> 1),pal2bit((i & 0x18) >> 3),pal2bit((i & 0x60) >> 5));
+ color = rgb_t(pal2bit((i & 0x6) >> 1),pal2bit((i & 0x18) >> 3),pal2bit((i & 0x60) >> 5));
else
- color = RGB_BLACK;
+ color = rgb_t::black;
palette_set_color(machine(), i, color);
}
diff --git a/src/mame/drivers/mpu4dealem.c b/src/mame/drivers/mpu4dealem.c
index b0b75f2f556..9c04920ff12 100644
--- a/src/mame/drivers/mpu4dealem.c
+++ b/src/mame/drivers/mpu4dealem.c
@@ -109,7 +109,7 @@ PALETTE_INIT_MEMBER(mpu4dealem_state,dealem)
bit1 = BIT(*color_prom,7);
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/drivers/mpu4vid.c b/src/mame/drivers/mpu4vid.c
index 52eb05546c4..620672c27cc 100644
--- a/src/mame/drivers/mpu4vid.c
+++ b/src/mame/drivers/mpu4vid.c
@@ -625,7 +625,7 @@ WRITE16_MEMBER(mpu4vid_state::bt471_w )
if (++*addr_cnt == 3)
{
- palette_set_color(space.machine(), bt471.address, MAKE_RGB(color[0], color[1], color[2]));
+ palette_set_color(space.machine(), bt471.address, rgb_t(color[0], color[1], color[2]));
*addr_cnt = 0;
/* Address register increments */
diff --git a/src/mame/drivers/murogmbl.c b/src/mame/drivers/murogmbl.c
index 2e2b3f46deb..023d820b8fa 100644
--- a/src/mame/drivers/murogmbl.c
+++ b/src/mame/drivers/murogmbl.c
@@ -79,7 +79,7 @@ void murogmbl_state::palette_init()
bit2 = (color_prom[0] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/namcos23.c b/src/mame/drivers/namcos23.c
index cf816cba283..e9f5821608c 100644
--- a/src/mame/drivers/namcos23.c
+++ b/src/mame/drivers/namcos23.c
@@ -2093,7 +2093,7 @@ void namcos23_state::update_mixer()
// 0a - background color blue
// 1b - text layer palette base
// 1f - layer enable (d0: polygons, d1: sprites, d2: text)
- m_c404.bgcolor = MAKE_RGB(nthword(m_gammaram,0x08), nthword(m_gammaram,0x09), nthword(m_gammaram,0x0a));
+ m_c404.bgcolor = rgb_t(nthword(m_gammaram,0x08), nthword(m_gammaram,0x09), nthword(m_gammaram,0x0a));
m_c404.palbase = nthword(m_gammaram, 0x1b) << 8 & 0x7f00;
m_c404.layer = nthword(m_gammaram, 0x1f) & 0xff;
}
@@ -2109,7 +2109,7 @@ WRITE32_MEMBER(namcos23_state::s23_paletteram_w)
int r = nthbyte(m_generic_paletteram_32, which|0x00001);
int g = nthbyte(m_generic_paletteram_32, which|0x10001);
int b = nthbyte(m_generic_paletteram_32, which|0x20001);
- palette_set_color(machine(), which/2, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), which/2, rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c
index b2d7d8d25ed..1f328649259 100644
--- a/src/mame/drivers/neoprint.c
+++ b/src/mame/drivers/neoprint.c
@@ -271,7 +271,7 @@ WRITE16_MEMBER(neoprint_state::nprsp_palette_w)
pal_entry = ((offset & 0xfffe) >> 1) + ((offset & 0x20000) ? 0x8000 : 0);
- palette_set_color(machine(), pal_entry, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), pal_entry, rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/nightgal.c b/src/mame/drivers/nightgal.c
index 71917b37533..dc06762ccd7 100644
--- a/src/mame/drivers/nightgal.c
+++ b/src/mame/drivers/nightgal.c
@@ -338,7 +338,7 @@ void nightgal_state::palette_init()
bit1 = BIT(color_prom[i], 7);
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/norautp.c b/src/mame/drivers/norautp.c
index 909718cf210..283995b1b69 100644
--- a/src/mame/drivers/norautp.c
+++ b/src/mame/drivers/norautp.c
@@ -615,14 +615,14 @@ UINT32 norautp_state::screen_update_norautp(screen_device &screen, bitmap_ind16
void norautp_state::palette_init()
{
/* 1st gfx bank */
- palette_set_color(machine(), 0, MAKE_RGB(0x00, 0x00, 0xff)); /* blue */
- palette_set_color(machine(), 1, MAKE_RGB(0xff, 0xff, 0x00)); /* yellow */
- palette_set_color(machine(), 2, MAKE_RGB(0x00, 0x00, 0xff)); /* blue */
- palette_set_color(machine(), 3, MAKE_RGB(0xff, 0xff, 0xff)); /* white */
- palette_set_color(machine(), 4, MAKE_RGB(0xff, 0xff, 0xff)); /* white */
- palette_set_color(machine(), 5, MAKE_RGB(0xff, 0x00, 0x00)); /* red */
- palette_set_color(machine(), 6, MAKE_RGB(0xff, 0xff, 0xff)); /* white */
- palette_set_color(machine(), 7, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
+ palette_set_color(machine(), 0, rgb_t(0x00, 0x00, 0xff)); /* blue */
+ palette_set_color(machine(), 1, rgb_t(0xff, 0xff, 0x00)); /* yellow */
+ palette_set_color(machine(), 2, rgb_t(0x00, 0x00, 0xff)); /* blue */
+ palette_set_color(machine(), 3, rgb_t(0xff, 0xff, 0xff)); /* white */
+ palette_set_color(machine(), 4, rgb_t(0xff, 0xff, 0xff)); /* white */
+ palette_set_color(machine(), 5, rgb_t(0xff, 0x00, 0x00)); /* red */
+ palette_set_color(machine(), 6, rgb_t(0xff, 0xff, 0xff)); /* white */
+ palette_set_color(machine(), 7, rgb_t(0x00, 0x00, 0x00)); /* black */
}
diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c
index 1d39b1c4f31..a0416e21fce 100644
--- a/src/mame/drivers/nyny.c
+++ b/src/mame/drivers/nyny.c
@@ -269,7 +269,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
for (i = 0; i < NUM_PENS; i++)
{
- state->m_pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ state->m_pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
}
return state->m_pens;
diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c
index b501a02693d..290f24489b0 100644
--- a/src/mame/drivers/olibochu.c
+++ b/src/mame/drivers/olibochu.c
@@ -131,7 +131,7 @@ void olibochu_state::palette_init()
bit1 = BIT(color_prom[pen], 7);
b = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c
index ba6a9ff5a9f..f3351491237 100644
--- a/src/mame/drivers/othello.c
+++ b/src/mame/drivers/othello.c
@@ -130,17 +130,17 @@ void othello_state::palette_init()
int i;
for (i = 0; i < machine().total_colors(); i++)
{
- palette_set_color(machine(), i, MAKE_RGB(0xff, 0x00, 0xff));
+ palette_set_color(machine(), i, rgb_t(0xff, 0x00, 0xff));
}
/* only colors 2,3,7,9,c,d,f are used */
- palette_set_color(machine(), 0x02, MAKE_RGB(0x00, 0xff, 0x00));
- palette_set_color(machine(), 0x03, MAKE_RGB(0xff, 0x7f, 0x00));
- palette_set_color(machine(), 0x07, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 0x09, MAKE_RGB(0xff, 0x00, 0x00));
- palette_set_color(machine(), 0x0c, MAKE_RGB(0x00, 0x00, 0xff));
- palette_set_color(machine(), 0x0d, MAKE_RGB(0x7f, 0x7f, 0x00));
- palette_set_color(machine(), 0x0f, MAKE_RGB(0xff, 0xff, 0xff));
+ palette_set_color(machine(), 0x02, rgb_t(0x00, 0xff, 0x00));
+ palette_set_color(machine(), 0x03, rgb_t(0xff, 0x7f, 0x00));
+ palette_set_color(machine(), 0x07, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 0x09, rgb_t(0xff, 0x00, 0x00));
+ palette_set_color(machine(), 0x0c, rgb_t(0x00, 0x00, 0xff));
+ palette_set_color(machine(), 0x0d, rgb_t(0x7f, 0x7f, 0x00));
+ palette_set_color(machine(), 0x0f, rgb_t(0xff, 0xff, 0xff));
}
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, othello_state )
diff --git a/src/mame/drivers/panicr.c b/src/mame/drivers/panicr.c
index 6f05b441c89..5c8fbb9031e 100644
--- a/src/mame/drivers/panicr.c
+++ b/src/mame/drivers/panicr.c
@@ -146,7 +146,7 @@ void panicr_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/drivers/pcxt.c b/src/mame/drivers/pcxt.c
index 2daeae7cfad..105be9347b2 100644
--- a/src/mame/drivers/pcxt.c
+++ b/src/mame/drivers/pcxt.c
@@ -142,7 +142,7 @@ UINT32 pcxt_state::screen_update_tetriskr(screen_device &screen, bitmap_rgb32 &b
//popmessage("%04x",m_start_offs);
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::black, cliprect);
for(y=0;y<200/8;y++)
{
diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c
index 2ce5a44b61c..ab01a9bd095 100644
--- a/src/mame/drivers/peplus.c
+++ b/src/mame/drivers/peplus.c
@@ -366,7 +366,7 @@ WRITE8_MEMBER(peplus_state::peplus_bgcolor_w)
bit2 = 0;
b = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
- palette_set_color(machine(), (15 + (i*16)), MAKE_RGB(r, g, b));
+ palette_set_color(machine(), (15 + (i*16)), rgb_t(r, g, b));
}
}
@@ -1029,7 +1029,7 @@ void peplus_state::palette_init()
bit2 = 0;
b = 0x21 * bit2 + 0x47 * bit1 + 0x97 * bit0;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/photon2.c b/src/mame/drivers/photon2.c
index fb053c2fd45..2ccc9dc148c 100644
--- a/src/mame/drivers/photon2.c
+++ b/src/mame/drivers/photon2.c
@@ -70,22 +70,22 @@ public:
#define SPEC_CYCLES_PER_LINE 224 /* Number of cycles to display a single line */
static const rgb_t spectrum_palette[16] = {
- MAKE_RGB(0x00, 0x00, 0x00),
- MAKE_RGB(0x00, 0x00, 0xbf),
- MAKE_RGB(0xbf, 0x00, 0x00),
- MAKE_RGB(0xbf, 0x00, 0xbf),
- MAKE_RGB(0x00, 0xbf, 0x00),
- MAKE_RGB(0x00, 0xbf, 0xbf),
- MAKE_RGB(0xbf, 0xbf, 0x00),
- MAKE_RGB(0xbf, 0xbf, 0xbf),
- MAKE_RGB(0x00, 0x00, 0x00),
- MAKE_RGB(0x00, 0x00, 0xff),
- MAKE_RGB(0xff, 0x00, 0x00),
- MAKE_RGB(0xff, 0x00, 0xff),
- MAKE_RGB(0x00, 0xff, 0x00),
- MAKE_RGB(0x00, 0xff, 0xff),
- MAKE_RGB(0xff, 0xff, 0x00),
- MAKE_RGB(0xff, 0xff, 0xff)
+ rgb_t(0x00, 0x00, 0x00),
+ rgb_t(0x00, 0x00, 0xbf),
+ rgb_t(0xbf, 0x00, 0x00),
+ rgb_t(0xbf, 0x00, 0xbf),
+ rgb_t(0x00, 0xbf, 0x00),
+ rgb_t(0x00, 0xbf, 0xbf),
+ rgb_t(0xbf, 0xbf, 0x00),
+ rgb_t(0xbf, 0xbf, 0xbf),
+ rgb_t(0x00, 0x00, 0x00),
+ rgb_t(0x00, 0x00, 0xff),
+ rgb_t(0xff, 0x00, 0x00),
+ rgb_t(0xff, 0x00, 0xff),
+ rgb_t(0x00, 0xff, 0x00),
+ rgb_t(0x00, 0xff, 0xff),
+ rgb_t(0xff, 0xff, 0x00),
+ rgb_t(0xff, 0xff, 0xff)
};
/* Initialise the palette */
diff --git a/src/mame/drivers/pinball2k.c b/src/mame/drivers/pinball2k.c
index dcc5733343b..f466347bc7c 100644
--- a/src/mame/drivers/pinball2k.c
+++ b/src/mame/drivers/pinball2k.c
@@ -125,10 +125,10 @@ public:
static const rgb_t cga_palette[16] =
{
- MAKE_RGB( 0x00, 0x00, 0x00 ), MAKE_RGB( 0x00, 0x00, 0xaa ), MAKE_RGB( 0x00, 0xaa, 0x00 ), MAKE_RGB( 0x00, 0xaa, 0xaa ),
- MAKE_RGB( 0xaa, 0x00, 0x00 ), MAKE_RGB( 0xaa, 0x00, 0xaa ), MAKE_RGB( 0xaa, 0x55, 0x00 ), MAKE_RGB( 0xaa, 0xaa, 0xaa ),
- MAKE_RGB( 0x55, 0x55, 0x55 ), MAKE_RGB( 0x55, 0x55, 0xff ), MAKE_RGB( 0x55, 0xff, 0x55 ), MAKE_RGB( 0x55, 0xff, 0xff ),
- MAKE_RGB( 0xff, 0x55, 0x55 ), MAKE_RGB( 0xff, 0x55, 0xff ), MAKE_RGB( 0xff, 0xff, 0x55 ), MAKE_RGB( 0xff, 0xff, 0xff ),
+ rgb_t( 0x00, 0x00, 0x00 ), rgb_t( 0x00, 0x00, 0xaa ), rgb_t( 0x00, 0xaa, 0x00 ), rgb_t( 0x00, 0xaa, 0xaa ),
+ rgb_t( 0xaa, 0x00, 0x00 ), rgb_t( 0xaa, 0x00, 0xaa ), rgb_t( 0xaa, 0x55, 0x00 ), rgb_t( 0xaa, 0xaa, 0xaa ),
+ rgb_t( 0x55, 0x55, 0x55 ), rgb_t( 0x55, 0x55, 0xff ), rgb_t( 0x55, 0xff, 0x55 ), rgb_t( 0x55, 0xff, 0xff ),
+ rgb_t( 0xff, 0x55, 0x55 ), rgb_t( 0xff, 0x55, 0xff ), rgb_t( 0xff, 0xff, 0x55 ), rgb_t( 0xff, 0xff, 0xff ),
};
void pinball2k_state::video_start()
diff --git a/src/mame/drivers/pipeline.c b/src/mame/drivers/pipeline.c
index 1da07e0b234..f966deabf29 100644
--- a/src/mame/drivers/pipeline.c
+++ b/src/mame/drivers/pipeline.c
@@ -384,7 +384,7 @@ void pipeline_state::palette_init()
r*=36;
g*=36;
b*=85;
- palette_set_color(machine(), 0x100+i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), 0x100+i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c
index fa949b27532..e42d824d4b9 100644
--- a/src/mame/drivers/plygonet.c
+++ b/src/mame/drivers/plygonet.c
@@ -298,7 +298,7 @@ WRITE32_MEMBER(polygonet_state::plygonet_palette_w)
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
b = (m_generic_paletteram_32[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
diff --git a/src/mame/drivers/poker72.c b/src/mame/drivers/poker72.c
index 4847521765e..f4acdba9487 100644
--- a/src/mame/drivers/poker72.c
+++ b/src/mame/drivers/poker72.c
@@ -331,7 +331,7 @@ void poker72_state::palette_init()
r = (x & 0xf)*0x10;
g = ((x & 0x3c)>>2)*0x10;
b = ((x & 0xf0)>>4)*0x10;
- palette_set_color(machine(),x,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),x,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/poolshrk.c b/src/mame/drivers/poolshrk.c
index 65ee624e3cb..f4bb0e1dc2b 100644
--- a/src/mame/drivers/poolshrk.c
+++ b/src/mame/drivers/poolshrk.c
@@ -204,10 +204,10 @@ GFXDECODE_END
void poolshrk_state::palette_init()
{
- palette_set_color(machine(),0,MAKE_RGB(0x7F, 0x7F, 0x7F));
- palette_set_color(machine(),1,MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(),2,MAKE_RGB(0x7F, 0x7F, 0x7F));
- palette_set_color(machine(),3,MAKE_RGB(0x00, 0x00, 0x00));
+ palette_set_color(machine(),0,rgb_t(0x7F, 0x7F, 0x7F));
+ palette_set_color(machine(),1,rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(),2,rgb_t(0x7F, 0x7F, 0x7F));
+ palette_set_color(machine(),3,rgb_t(0x00, 0x00, 0x00));
}
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index 71a20605cbe..f07e21766e1 100644
--- a/src/mame/drivers/progolf.c
+++ b/src/mame/drivers/progolf.c
@@ -417,7 +417,7 @@ void progolf_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c
index 9bc1418ea6c..fdf3042a9a4 100644
--- a/src/mame/drivers/psikyo4.c
+++ b/src/mame/drivers/psikyo4.c
@@ -209,8 +209,8 @@ WRITE32_MEMBER(psikyo4_state::ps4_paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_
g = ((m_paletteram[offset] & 0x00ff0000) >> 16);
r = ((m_paletteram[offset] & 0xff000000) >> 24);
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
- palette_set_color(machine(), offset + 0x800, MAKE_RGB(r, g, b)); // For screen 2
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
+ palette_set_color(machine(), offset + 0x800, rgb_t(r, g, b)); // For screen 2
}
WRITE32_MEMBER(psikyo4_state::ps4_bgpen_1_dword_w)
@@ -222,7 +222,7 @@ WRITE32_MEMBER(psikyo4_state::ps4_bgpen_1_dword_w)
g = ((m_bgpen_1[0] & 0x00ff0000) >>16);
r = ((m_bgpen_1[0] & 0xff000000) >>24);
- palette_set_color(machine(), 0x1000, MAKE_RGB(r, g, b)); // Clear colour for screen 1
+ palette_set_color(machine(), 0x1000, rgb_t(r, g, b)); // Clear colour for screen 1
}
WRITE32_MEMBER(psikyo4_state::ps4_bgpen_2_dword_w)
@@ -234,7 +234,7 @@ WRITE32_MEMBER(psikyo4_state::ps4_bgpen_2_dword_w)
g = ((m_bgpen_2[0] & 0x00ff0000) >>16);
r = ((m_bgpen_2[0] & 0xff000000) >>24);
- palette_set_color(machine(), 0x1001, MAKE_RGB(r, g, b)); // Clear colour for screen 2
+ palette_set_color(machine(), 0x1001, rgb_t(r, g, b)); // Clear colour for screen 2
}
WRITE32_MEMBER(psikyo4_state::ps4_screen1_brt_w)
diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c
index 1c7a37b329f..4dd47e5a97d 100644
--- a/src/mame/drivers/psikyosh.c
+++ b/src/mame/drivers/psikyosh.c
@@ -356,7 +356,7 @@ WRITE32_MEMBER(psikyosh_state::paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dwo
g = ((m_paletteram[offset] & 0x00ff0000) >>16);
r = ((m_paletteram[offset] & 0xff000000) >>24);
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
WRITE32_MEMBER(psikyosh_state::psikyosh_vidregs_w)
diff --git a/src/mame/drivers/quizo.c b/src/mame/drivers/quizo.c
index 4e83da3aa66..ea992f36994 100644
--- a/src/mame/drivers/quizo.c
+++ b/src/mame/drivers/quizo.c
@@ -77,7 +77,7 @@ void quizo_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/drivers/quizshow.c b/src/mame/drivers/quizshow.c
index 8855d8b72f5..6bb1bc70602 100644
--- a/src/mame/drivers/quizshow.c
+++ b/src/mame/drivers/quizshow.c
@@ -87,8 +87,8 @@ void quizshow_state::palette_init()
{
machine().colortable = colortable_alloc(machine(), 2);
- colortable_palette_set_color(machine().colortable, 0, RGB_BLACK);
- colortable_palette_set_color(machine().colortable, 1, RGB_WHITE);
+ colortable_palette_set_color(machine().colortable, 0, rgb_t::black);
+ colortable_palette_set_color(machine().colortable, 1, rgb_t::white);
// normal, blink/off, invert, blink+invert
const int lut_pal[16] = {
diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c
index 579c0d1f524..5bba46a6261 100644
--- a/src/mame/drivers/r2dtank.c
+++ b/src/mame/drivers/r2dtank.c
@@ -298,7 +298,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
for (i = 0; i < NUM_PENS; i++)
{
- state->m_pens[i] = MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0));
+ state->m_pens[i] = rgb_t(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0));
}
return state->m_pens;
@@ -344,7 +344,7 @@ static MC6845_UPDATE_ROW( update_row )
data = data << 1;
}
- color = bit ? fore_color : RGB_BLACK;
+ color = bit ? fore_color : 0;
bitmap.pix32(y, x) = pens[color];
x = x + 1;
diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c
index 2d90b926748..3beb483f50b 100644
--- a/src/mame/drivers/rabbit.c
+++ b/src/mame/drivers/rabbit.c
@@ -522,7 +522,7 @@ WRITE32_MEMBER(rabbit_state::rabbit_paletteram_dword_w)
r = ((m_generic_paletteram_32[offset] & 0x0000ff00) >>8);
g = ((m_generic_paletteram_32[offset] & 0x00ff0000) >>16);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
READ32_MEMBER(rabbit_state::rabbit_tilemap0_r)
diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c
index b0e24516438..acc84a618b7 100644
--- a/src/mame/drivers/rotaryf.c
+++ b/src/mame/drivers/rotaryf.c
@@ -164,8 +164,8 @@ UINT32 rotaryf_state::screen_update_rotaryf(screen_device &screen, bitmap_rgb32
{
offs_t offs;
pen_t pens[2];
- pens[0] = RGB_BLACK;
- pens[1] = RGB_WHITE;
+ pens[0] = rgb_t::black;
+ pens[1] = rgb_t::white;
UINT8 i,x,y,data;
for (offs = 0; offs < m_videoram.bytes(); offs++)
diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c
index ec077e4f9a9..20d7ce98c56 100644
--- a/src/mame/drivers/roul.c
+++ b/src/mame/drivers/roul.c
@@ -116,7 +116,7 @@ void roul_state::palette_init()
bit1 = (color_prom[0] >> 5) & 0x01;
r = 0x0e * bit6 + 0x1f * bit7 + 0x43 * bit0 + 0x8f * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/safarir.c b/src/mame/drivers/safarir.c
index 821e1d96060..89f17b4cb1e 100644
--- a/src/mame/drivers/safarir.c
+++ b/src/mame/drivers/safarir.c
@@ -152,8 +152,8 @@ void safarir_state::palette_init()
for (i = 0; i < machine().total_colors() / 2; i++)
{
- palette_set_color(machine(), (i * 2) + 0, RGB_BLACK);
- palette_set_color(machine(), (i * 2) + 1, MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0)));
+ palette_set_color(machine(), (i * 2) + 0, rgb_t::black);
+ palette_set_color(machine(), (i * 2) + 1, rgb_t(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i >> 0)));
}
}
diff --git a/src/mame/drivers/sbowling.c b/src/mame/drivers/sbowling.c
index 302efdc013d..e6bc9c28892 100644
--- a/src/mame/drivers/sbowling.c
+++ b/src/mame/drivers/sbowling.c
@@ -374,7 +374,7 @@ void sbowling_state::palette_init()
bit2 = (color_prom[i+0x400] >> 3) & 0x01;
r = (int)(outputs_r[ (bit0<<0) | (bit1<<1) | (bit2<<2) ] + 0.5);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/seabattl.c b/src/mame/drivers/seabattl.c
index 1a3a174f3ff..f994b45e10f 100644
--- a/src/mame/drivers/seabattl.c
+++ b/src/mame/drivers/seabattl.c
@@ -110,19 +110,19 @@ void seabattl_state::palette_init()
// sprites (m.obj) + s2636
for (int i = 0; i < 8; i++)
{
- palette_set_color(machine(), i, MAKE_RGB((i & 1) ? 0xff : 0x00, (i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00));
+ palette_set_color(machine(), i, rgb_t((i & 1) ? 0xff : 0x00, (i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00));
}
// scr
for (int i = 0; i < 8; i++)
{
- palette_set_color(machine(), 8 + 2 * i + 0, RGB_BLACK);
- palette_set_color(machine(), 8 + 2 * i + 1, MAKE_RGB((i & 1) ? 0xff : 0x00, (i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00));
+ palette_set_color(machine(), 8 + 2 * i + 0, rgb_t::black);
+ palette_set_color(machine(), 8 + 2 * i + 1, rgb_t((i & 1) ? 0xff : 0x00, (i & 2) ? 0xff : 0x00, (i & 4) ? 0xff : 0x00));
}
// wave
- palette_set_color(machine(), 24, RGB_BLACK);
- palette_set_color(machine(), 25, MAKE_RGB(0x00, 0xff, 0xff)); // cyan
+ palette_set_color(machine(), 24, rgb_t::black);
+ palette_set_color(machine(), 25, rgb_t(0x00, 0xff, 0xff)); // cyan
}
TILE_GET_INFO_MEMBER(seabattl_state::get_bg_tile_info)
diff --git a/src/mame/drivers/segald.c b/src/mame/drivers/segald.c
index acfd4122dde..cc86898d0ac 100644
--- a/src/mame/drivers/segald.c
+++ b/src/mame/drivers/segald.c
@@ -226,7 +226,7 @@ WRITE8_MEMBER(segald_state::astron_COLOR_write)
b = (highBits & 0x0f);
a = (highBits & 0x80) ? 0 : 255;
- palette_set_color(machine(), palIndex, MAKE_ARGB(a, r, g, b));
+ palette_set_color(machine(), palIndex, rgb_t(a, r, g, b));
logerror("COLOR write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, space.device().safe_pc());
}
diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c
index 1c7bb089d29..0f18a74de7b 100644
--- a/src/mame/drivers/segas24.c
+++ b/src/mame/drivers/segas24.c
@@ -1106,7 +1106,7 @@ WRITE16_MEMBER( segas24_state::sys16_paletteram_w )
g |= g >> 5;
b |= b >> 5;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
if(data & 0x8000) {
r = 255-0.6*(255-r);
@@ -1117,7 +1117,7 @@ WRITE16_MEMBER( segas24_state::sys16_paletteram_w )
g = 0.6*g;
b = 0.6*b;
}
- palette_set_color(machine(), offset+machine().total_colors()/2, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset+machine().total_colors()/2, rgb_t(r, g, b));
}
diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c
index 5021eef052b..97bc97fc1a5 100644
--- a/src/mame/drivers/shanghai.c
+++ b/src/mame/drivers/shanghai.c
@@ -73,7 +73,7 @@ PALETTE_INIT_MEMBER(shanghai_state,shanghai)
bit2 = (i >> 1) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/shougi.c b/src/mame/drivers/shougi.c
index 919ef899173..e3df87616e6 100644
--- a/src/mame/drivers/shougi.c
+++ b/src/mame/drivers/shougi.c
@@ -175,7 +175,7 @@ void shougi_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/skyarmy.c b/src/mame/drivers/skyarmy.c
index 9ed0bf48a78..23e73e556d8 100644
--- a/src/mame/drivers/skyarmy.c
+++ b/src/mame/drivers/skyarmy.c
@@ -115,7 +115,7 @@ void skyarmy_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/drivers/skydiver.c b/src/mame/drivers/skydiver.c
index 2a05988d17c..3d8fcc965b2 100644
--- a/src/mame/drivers/skydiver.c
+++ b/src/mame/drivers/skydiver.c
@@ -122,9 +122,9 @@ void skydiver_state::palette_init()
switch (colortable_source[i])
{
- case 0: color = RGB_BLACK; break;
- case 1: color = RGB_WHITE; break;
- default: color = MAKE_RGB(0xa0, 0xa0, 0xa0); break; /* grey */
+ case 0: color = rgb_t::black; break;
+ case 1: color = rgb_t::white; break;
+ default: color = rgb_t(0xa0, 0xa0, 0xa0); break; /* grey */
}
palette_set_color(machine(), i, color);
diff --git a/src/mame/drivers/skylncr.c b/src/mame/drivers/skylncr.c
index c09abb4e9da..9181df9df5d 100644
--- a/src/mame/drivers/skylncr.c
+++ b/src/mame/drivers/skylncr.c
@@ -282,7 +282,7 @@ WRITE8_MEMBER(skylncr_state::skylncr_paletteram_w)
g = (g << 2) | (g >> 4);
b = (b << 2) | (b >> 4);
- palette_set_color(machine(), m_color / 3, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), m_color / 3, rgb_t(r, g, b));
m_color = (m_color + 1) % (0x100 * 3);
}
}
@@ -305,7 +305,7 @@ WRITE8_MEMBER(skylncr_state::skylncr_paletteram2_w)
g = (g << 2) | (g >> 4);
b = (b << 2) | (b >> 4);
- palette_set_color(machine(), 0x100 + m_color2 / 3, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), 0x100 + m_color2 / 3, rgb_t(r, g, b));
m_color2 = (m_color2 + 1) % (0x100 * 3);
}
}
diff --git a/src/mame/drivers/skyraid.c b/src/mame/drivers/skyraid.c
index 1fd90504572..02019a787da 100644
--- a/src/mame/drivers/skyraid.c
+++ b/src/mame/drivers/skyraid.c
@@ -12,26 +12,26 @@ Atari Sky Raider driver
void skyraid_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0x00, 0x00, 0x00)); /* terrain */
- palette_set_color(machine(), 1, MAKE_RGB(0x18, 0x18, 0x18));
- palette_set_color(machine(), 2, MAKE_RGB(0x30, 0x30, 0x30));
- palette_set_color(machine(), 3, MAKE_RGB(0x48, 0x48, 0x48));
- palette_set_color(machine(), 4, MAKE_RGB(0x60, 0x60, 0x60));
- palette_set_color(machine(), 5, MAKE_RGB(0x78, 0x78, 0x78));
- palette_set_color(machine(), 6, MAKE_RGB(0x90, 0x90, 0x90));
- palette_set_color(machine(), 7, MAKE_RGB(0xA8, 0xA8, 0xA8));
- palette_set_color(machine(), 8, MAKE_RGB(0x10, 0x10, 0x10)); /* sprites */
- palette_set_color(machine(), 9, MAKE_RGB(0xE0, 0xE0, 0xE0));
- palette_set_color(machine(), 10, MAKE_RGB(0xA0, 0xA0, 0xA0));
- palette_set_color(machine(), 11, MAKE_RGB(0x48, 0x48, 0x48));
- palette_set_color(machine(), 12, MAKE_RGB(0x10, 0x10, 0x10));
- palette_set_color(machine(), 13, MAKE_RGB(0x48, 0x48, 0x48));
- palette_set_color(machine(), 14, MAKE_RGB(0xA0, 0xA0, 0xA0));
- palette_set_color(machine(), 15, MAKE_RGB(0xE0, 0xE0, 0xE0));
- palette_set_color(machine(), 16, MAKE_RGB(0x00, 0x00, 0x00)); /* missiles */
- palette_set_color(machine(), 17, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 18, MAKE_RGB(0x00, 0x00, 0x00)); /* text */
- palette_set_color(machine(), 19, MAKE_RGB(0xE0, 0xE0, 0xE0));
+ palette_set_color(machine(), 0, rgb_t(0x00, 0x00, 0x00)); /* terrain */
+ palette_set_color(machine(), 1, rgb_t(0x18, 0x18, 0x18));
+ palette_set_color(machine(), 2, rgb_t(0x30, 0x30, 0x30));
+ palette_set_color(machine(), 3, rgb_t(0x48, 0x48, 0x48));
+ palette_set_color(machine(), 4, rgb_t(0x60, 0x60, 0x60));
+ palette_set_color(machine(), 5, rgb_t(0x78, 0x78, 0x78));
+ palette_set_color(machine(), 6, rgb_t(0x90, 0x90, 0x90));
+ palette_set_color(machine(), 7, rgb_t(0xA8, 0xA8, 0xA8));
+ palette_set_color(machine(), 8, rgb_t(0x10, 0x10, 0x10)); /* sprites */
+ palette_set_color(machine(), 9, rgb_t(0xE0, 0xE0, 0xE0));
+ palette_set_color(machine(), 10, rgb_t(0xA0, 0xA0, 0xA0));
+ palette_set_color(machine(), 11, rgb_t(0x48, 0x48, 0x48));
+ palette_set_color(machine(), 12, rgb_t(0x10, 0x10, 0x10));
+ palette_set_color(machine(), 13, rgb_t(0x48, 0x48, 0x48));
+ palette_set_color(machine(), 14, rgb_t(0xA0, 0xA0, 0xA0));
+ palette_set_color(machine(), 15, rgb_t(0xE0, 0xE0, 0xE0));
+ palette_set_color(machine(), 16, rgb_t(0x00, 0x00, 0x00)); /* missiles */
+ palette_set_color(machine(), 17, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 18, rgb_t(0x00, 0x00, 0x00)); /* text */
+ palette_set_color(machine(), 19, rgb_t(0xE0, 0xE0, 0xE0));
}
READ8_MEMBER(skyraid_state::skyraid_port_0_r)
diff --git a/src/mame/drivers/slapshot.c b/src/mame/drivers/slapshot.c
index ea86d632908..0fcd4b2c190 100644
--- a/src/mame/drivers/slapshot.c
+++ b/src/mame/drivers/slapshot.c
@@ -160,7 +160,7 @@ WRITE16_MEMBER(slapshot_state::color_ram_word_w)
g = (m_color_ram[offset] & 0xff00) >> 8;
b = (m_color_ram[offset] & 0xff);
- palette_set_color(machine(), offset / 2, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), offset / 2, rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c
index 6273fae6c32..55c7022e5e0 100644
--- a/src/mame/drivers/slotcarn.c
+++ b/src/mame/drivers/slotcarn.c
@@ -97,7 +97,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
bit0 = BIT(i,0);
bit1 = BIT(i,1);
bit2 = BIT(i,2);
- state->m_pens[i] = MAKE_RGB(dim*bit0, dim*bit1, dim*bit2);
+ state->m_pens[i] = rgb_t(dim*bit0, dim*bit1, dim*bit2);
}
return state->m_pens;
diff --git a/src/mame/drivers/smsmcorp.c b/src/mame/drivers/smsmcorp.c
index ac7dab35a94..ea12230d622 100644
--- a/src/mame/drivers/smsmcorp.c
+++ b/src/mame/drivers/smsmcorp.c
@@ -495,7 +495,7 @@ void smsmfg_state::palette_init()
for (i = 0; i < 8; i++ )
{
- palette_set_color(machine(), i, MAKE_RGB(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i)));
+ palette_set_color(machine(), i, rgb_t(pal1bit(i >> 2), pal1bit(i >> 1), pal1bit(i)));
}
}
diff --git a/src/mame/drivers/spaceg.c b/src/mame/drivers/spaceg.c
index c36e627abf5..55e2cad191e 100644
--- a/src/mame/drivers/spaceg.c
+++ b/src/mame/drivers/spaceg.c
@@ -206,26 +206,26 @@ void spaceg_state::palette_init()
int i;
for (i = 0; i < 128; i++)
- palette_set_color (machine(), i, MAKE_RGB(0x00,0x00,0x00));
+ palette_set_color (machine(), i, rgb_t(0x00,0x00,0x00));
// proms are currently undumped...
- palette_set_color (machine(), 0, MAKE_RGB(0x00,0x00,0x00)); //ok czarny
- palette_set_color (machine(), 1, MAKE_RGB(0x7f,0x00,0x00));//???
- palette_set_color (machine(), 2, MAKE_RGB(0xff,0xff,0xff)); //ok+ bialy
- palette_set_color (machine(), 3, MAKE_RGB(0xff,0x00,0x00)); //ok j.czerw.
- palette_set_color (machine(), 4, MAKE_RGB(0x3f,0x3f,0xff)); //ok j.niebieski
- palette_set_color (machine(), 5, MAKE_RGB(0x3f,0xff,0x3f)); //ok j.zielony
- palette_set_color (machine(), 6, MAKE_RGB(0xff,0xbf,0xbf)); //ok+ 'majtki'
- palette_set_color (machine(), 7, MAKE_RGB(0xff,0xff,0x00)); //ok+ zolty
-
- palette_set_color (machine(), 8, MAKE_RGB(0xff,0x7f,0x00)); //ok+ pomaranczowy
- palette_set_color (machine(), 9, MAKE_RGB(0x3f,0xbf,0xff)); //ok j.niebieski (ciemniejszy od 13)
- palette_set_color (machine(), 10, MAKE_RGB(0x3f,0xbf,0x3f)); //ok+ c.zielony
- palette_set_color (machine(), 11, MAKE_RGB(0x00,0xff,0x00)); //ok j.zielony
- palette_set_color (machine(), 12, MAKE_RGB(0x7f,0x00,0x00)); //ok brazowy (c.czerw)
- palette_set_color (machine(), 13, MAKE_RGB(0x7f,0xbf,0xff)); //ok j.niebieski (jasniejszy od 9)
- palette_set_color (machine(), 14, MAKE_RGB(0x00,0xff,0xff));//???
- palette_set_color (machine(), 15, MAKE_RGB(0x7f,0x7f,0x7f));//???
+ palette_set_color (machine(), 0, rgb_t(0x00,0x00,0x00)); //ok czarny
+ palette_set_color (machine(), 1, rgb_t(0x7f,0x00,0x00));//???
+ palette_set_color (machine(), 2, rgb_t(0xff,0xff,0xff)); //ok+ bialy
+ palette_set_color (machine(), 3, rgb_t(0xff,0x00,0x00)); //ok j.czerw.
+ palette_set_color (machine(), 4, rgb_t(0x3f,0x3f,0xff)); //ok j.niebieski
+ palette_set_color (machine(), 5, rgb_t(0x3f,0xff,0x3f)); //ok j.zielony
+ palette_set_color (machine(), 6, rgb_t(0xff,0xbf,0xbf)); //ok+ 'majtki'
+ palette_set_color (machine(), 7, rgb_t(0xff,0xff,0x00)); //ok+ zolty
+
+ palette_set_color (machine(), 8, rgb_t(0xff,0x7f,0x00)); //ok+ pomaranczowy
+ palette_set_color (machine(), 9, rgb_t(0x3f,0xbf,0xff)); //ok j.niebieski (ciemniejszy od 13)
+ palette_set_color (machine(), 10, rgb_t(0x3f,0xbf,0x3f)); //ok+ c.zielony
+ palette_set_color (machine(), 11, rgb_t(0x00,0xff,0x00)); //ok j.zielony
+ palette_set_color (machine(), 12, rgb_t(0x7f,0x00,0x00)); //ok brazowy (c.czerw)
+ palette_set_color (machine(), 13, rgb_t(0x7f,0xbf,0xff)); //ok j.niebieski (jasniejszy od 9)
+ palette_set_color (machine(), 14, rgb_t(0x00,0xff,0xff));//???
+ palette_set_color (machine(), 15, rgb_t(0x7f,0x7f,0x7f));//???
}
WRITE8_MEMBER(spaceg_state::zvideoram_w)
diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c
index 69fe8fe2e55..954d63ea46b 100644
--- a/src/mame/drivers/spcforce.c
+++ b/src/mame/drivers/spcforce.c
@@ -245,7 +245,7 @@ void spcforce_state::palette_init()
for (i = 0; i < sizeof(colortable_source) / sizeof(colortable_source[0]); i++)
{
int data = colortable_source[i];
- rgb_t color = MAKE_RGB(pal1bit(data >> 0), pal1bit(data >> 1), pal1bit(data >> 2));
+ rgb_t color = rgb_t(pal1bit(data >> 0), pal1bit(data >> 1), pal1bit(data >> 2));
palette_set_color(machine(), i, color);
}
diff --git a/src/mame/drivers/speglsht.c b/src/mame/drivers/speglsht.c
index a8563b17b08..ca45e0d0f9a 100644
--- a/src/mame/drivers/speglsht.c
+++ b/src/mame/drivers/speglsht.c
@@ -370,7 +370,7 @@ UINT32 speglsht_state::screen_update_speglsht(screen_device &screen, bitmap_rgb3
if(srcline[x])
{
rgb_t color=palette_get_color(machine(), srcline[x]);
- PLOT_PIXEL_RGB(x,y,RGB_RED(color),RGB_GREEN(color),RGB_BLUE(color));
+ PLOT_PIXEL_RGB(x,y,color.r(),color.g(),color.b());
}
}
}
diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c
index 301ffc88360..dcce1af032f 100644
--- a/src/mame/drivers/spiders.c
+++ b/src/mame/drivers/spiders.c
@@ -343,7 +343,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
for (i = 0; i < NUM_PENS; i++)
{
- state->m_pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ state->m_pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
}
return state->m_pens;
diff --git a/src/mame/drivers/srmp5.c b/src/mame/drivers/srmp5.c
index e789d807243..c6bde4360fe 100644
--- a/src/mame/drivers/srmp5.c
+++ b/src/mame/drivers/srmp5.c
@@ -229,7 +229,7 @@ READ32_MEMBER(srmp5_state::srmp5_palette_r)
WRITE32_MEMBER(srmp5_state::srmp5_palette_w)
{
COMBINE_DATA(&m_palram[offset]);
- palette_set_color(machine(), offset, MAKE_RGB(data << 3 & 0xFF, data >> 2 & 0xFF, data >> 7 & 0xFF));
+ palette_set_color(machine(), offset, rgb_t(data << 3 & 0xFF, data >> 2 & 0xFF, data >> 7 & 0xFF));
}
WRITE32_MEMBER(srmp5_state::bank_w)
{
diff --git a/src/mame/drivers/srmp6.c b/src/mame/drivers/srmp6.c
index 9991caacb40..ef0fe73e57f 100644
--- a/src/mame/drivers/srmp6.c
+++ b/src/mame/drivers/srmp6.c
@@ -156,7 +156,7 @@ void srmp6_state::update_palette()
b += ((0x1F - b) * brg) >> 5;
if(b > 0x1F) b = 0x1F;
}
- palette_set_color(machine(), i, MAKE_RGB(r << 3, g << 3, b << 3));
+ palette_set_color(machine(), i, rgb_t(r << 3, g << 3, b << 3));
}
}
@@ -529,7 +529,7 @@ WRITE16_MEMBER(srmp6_state::paletteram_w)
if(b > 0x1F) b = 0x1F;
}
- palette_set_color(machine(), offset, MAKE_RGB(r << 3, g << 3, b << 3));
+ palette_set_color(machine(), offset, rgb_t(r << 3, g << 3, b << 3));
}
}
diff --git a/src/mame/drivers/sshot.c b/src/mame/drivers/sshot.c
index 37e0a1b9420..8122f40c58a 100644
--- a/src/mame/drivers/sshot.c
+++ b/src/mame/drivers/sshot.c
@@ -337,8 +337,8 @@ GFXDECODE_END
void supershot_state::palette_init()
{
- palette_set_color(machine(),0,RGB_BLACK); /* black */
- palette_set_color(machine(),1,RGB_WHITE); /* white */
+ palette_set_color(machine(),0,rgb_t::black); /* black */
+ palette_set_color(machine(),1,rgb_t::white); /* white */
}
static MACHINE_CONFIG_START( supershot, supershot_state )
diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c
index 269a8708ba5..a5e80c93d9c 100644
--- a/src/mame/drivers/ssingles.c
+++ b/src/mame/drivers/ssingles.c
@@ -320,7 +320,7 @@ void ssingles_state::video_start()
int i;
for(i=0;i<NUM_PENS;++i)
{
- m_pens[i]=MAKE_RGB(ssingles_colors[3*i], ssingles_colors[3*i+1], ssingles_colors[3*i+2]);
+ m_pens[i]=rgb_t(ssingles_colors[3*i], ssingles_colors[3*i+1], ssingles_colors[3*i+2]);
}
}
}
diff --git a/src/mame/drivers/sspeedr.c b/src/mame/drivers/sspeedr.c
index 04ebc3aee9d..a62cdabbb6f 100644
--- a/src/mame/drivers/sspeedr.c
+++ b/src/mame/drivers/sspeedr.c
@@ -28,7 +28,7 @@ void sspeedr_state::palette_init()
b += 0x4f;
}
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/sstrangr.c b/src/mame/drivers/sstrangr.c
index e79dc1dbf3f..bd2158535c0 100644
--- a/src/mame/drivers/sstrangr.c
+++ b/src/mame/drivers/sstrangr.c
@@ -56,12 +56,12 @@ UINT32 sstrangr_state::screen_update_sstrangr(screen_device &screen, bitmap_rgb3
if (m_flip_screen)
{
- pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
+ pen = (data & 0x80) ? rgb_t::white : rgb_t::black;
data = data << 1;
}
else
{
- pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
+ pen = (data & 0x01) ? rgb_t::white : rgb_t::black;
data = data >> 1;
}
@@ -81,7 +81,7 @@ static void get_pens(pen_t *pens)
for (i = 0; i < NUM_PENS; i++)
{
- pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1));
+ pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1));
}
}
diff --git a/src/mame/drivers/stuntair.c b/src/mame/drivers/stuntair.c
index 2e04f3f9844..6512a97fc8a 100644
--- a/src/mame/drivers/stuntair.c
+++ b/src/mame/drivers/stuntair.c
@@ -153,12 +153,12 @@ PALETTE_INIT_MEMBER(stuntair_state, stuntair)
int g = (data&0x38)>>3;
int r = (data&0x07)>>0;
- palette_set_color(machine(),i,MAKE_RGB(r<<5,g<<5,b<<6));
+ palette_set_color(machine(),i,rgb_t(r<<5,g<<5,b<<6));
}
// just set the FG layer to black and white
- palette_set_color(machine(),0x100,MAKE_RGB(0x00,0x00,0x00));
- palette_set_color(machine(),0x101,MAKE_RGB(0xff,0xff,0xff));
+ palette_set_color(machine(),0x100,rgb_t(0x00,0x00,0x00));
+ palette_set_color(machine(),0x101,rgb_t(0xff,0xff,0xff));
}
diff --git a/src/mame/drivers/sub.c b/src/mame/drivers/sub.c
index c53db20669f..23c5680bb97 100644
--- a/src/mame/drivers/sub.c
+++ b/src/mame/drivers/sub.c
@@ -410,8 +410,8 @@ void sub_state::palette_init()
g = (color_prom[0x100] >> 0);
b = (color_prom[0x200] >> 0);
- //colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(pal4bit(r), pal4bit(g), pal4bit(b)));
+ //colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(pal4bit(r), pal4bit(g), pal4bit(b)));
color_prom++;
}
diff --git a/src/mame/drivers/subs.c b/src/mame/drivers/subs.c
index 69b981a817e..32dd6a7dc13 100644
--- a/src/mame/drivers/subs.c
+++ b/src/mame/drivers/subs.c
@@ -31,10 +31,10 @@
void subs_state::palette_init()
{
- palette_set_color(machine(),0,MAKE_RGB(0x00,0x00,0x00)); /* BLACK - modified on video invert */
- palette_set_color(machine(),1,MAKE_RGB(0xff,0xff,0xff)); /* WHITE - modified on video invert */
- palette_set_color(machine(),2,MAKE_RGB(0x00,0x00,0x00)); /* BLACK - modified on video invert */
- palette_set_color(machine(),3,MAKE_RGB(0xff,0xff,0xff)); /* WHITE - modified on video invert*/
+ palette_set_color(machine(),0,rgb_t(0x00,0x00,0x00)); /* BLACK - modified on video invert */
+ palette_set_color(machine(),1,rgb_t(0xff,0xff,0xff)); /* WHITE - modified on video invert */
+ palette_set_color(machine(),2,rgb_t(0x00,0x00,0x00)); /* BLACK - modified on video invert */
+ palette_set_color(machine(),3,rgb_t(0xff,0xff,0xff)); /* WHITE - modified on video invert*/
}
diff --git a/src/mame/drivers/subsino.c b/src/mame/drivers/subsino.c
index 3f52db08df2..6fc63fa0ca5 100644
--- a/src/mame/drivers/subsino.c
+++ b/src/mame/drivers/subsino.c
@@ -602,7 +602,7 @@ PALETTE_INIT_MEMBER(subsino_state,subsino_2proms)
bit2 = (val >> 2) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -629,7 +629,7 @@ PALETTE_INIT_MEMBER(subsino_state,subsino_3proms)
bit2 = (val >> 0) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/supdrapo.c b/src/mame/drivers/supdrapo.c
index 451a5926f3f..9b4144b7cd2 100644
--- a/src/mame/drivers/supdrapo.c
+++ b/src/mame/drivers/supdrapo.c
@@ -159,7 +159,7 @@ void supdrapo_state::palette_init()
bit2 = (color_prom[0x100] >> 1) & 0x01;
r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c
index 8fd34876e60..1477e7b3ad8 100644
--- a/src/mame/drivers/superchs.c
+++ b/src/mame/drivers/superchs.c
@@ -103,7 +103,7 @@ WRITE32_MEMBER(superchs_state::superchs_palette_w)
g = (a &0xff00) >> 8;
b = (a &0xff);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
READ32_MEMBER(superchs_state::superchs_input_r)
diff --git a/src/mame/drivers/supercrd.c b/src/mame/drivers/supercrd.c
index 8cc9c178b63..250455e98fc 100644
--- a/src/mame/drivers/supercrd.c
+++ b/src/mame/drivers/supercrd.c
@@ -230,7 +230,7 @@ PALETTE_INIT_MEMBER(supercrd_state, supercrd)
bit1 = (color_prom[i] >> 7) & 0x01;
g = combine_2_weights(weights_g, bit0, bit1);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/superdq.c b/src/mame/drivers/superdq.c
index 98b62f29db4..75c19240ea5 100644
--- a/src/mame/drivers/superdq.c
+++ b/src/mame/drivers/superdq.c
@@ -122,7 +122,7 @@ void superdq_state::palette_init()
bit1 = (color_prom[i] >> 0) & 0x01;
b = combine_2_weights(bweights, bit1, bit0);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -170,9 +170,9 @@ WRITE8_MEMBER(superdq_state::superdq_io_w)
{
int index = black_color_entries[i];
if (data & 0x80)
- palette_set_color(machine(), index, palette_get_color(machine(), index) & MAKE_ARGB(0,255,255,255));
+ palette_set_color(machine(), index, palette_get_color(machine(), index) & rgb_t(0,255,255,255));
else
- palette_set_color(machine(), index, palette_get_color(machine(), index) | MAKE_ARGB(255,0,0,0));
+ palette_set_color(machine(), index, palette_get_color(machine(), index) | rgb_t(255,0,0,0));
}
/*
diff --git a/src/mame/drivers/supertnk.c b/src/mame/drivers/supertnk.c
index 8c6d390bba5..08a8e4c6fb8 100644
--- a/src/mame/drivers/supertnk.c
+++ b/src/mame/drivers/supertnk.c
@@ -198,7 +198,7 @@ void supertnk_state::video_start()
{
UINT8 data = prom[i];
- m_pens[i] = MAKE_RGB(pal1bit(data >> 2), pal1bit(data >> 5), pal1bit(data >> 6));
+ m_pens[i] = rgb_t(pal1bit(data >> 2), pal1bit(data >> 5), pal1bit(data >> 6));
}
m_videoram[0] = auto_alloc_array(machine(), UINT8, 0x2000);
diff --git a/src/mame/drivers/superwng.c b/src/mame/drivers/superwng.c
index 55d237aa551..e76d3797d3b 100644
--- a/src/mame/drivers/superwng.c
+++ b/src/mame/drivers/superwng.c
@@ -197,7 +197,7 @@ void superwng_state::palette_init()
bit1 = BIT(*ptr, 7);
b = 0x4f * bit0 + 0xa8 * bit1;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
++ptr;
}
}
diff --git a/src/mame/drivers/taitowlf.c b/src/mame/drivers/taitowlf.c
index 3109629418c..1460b29723d 100644
--- a/src/mame/drivers/taitowlf.c
+++ b/src/mame/drivers/taitowlf.c
@@ -354,11 +354,11 @@ void taitowlf_state::machine_reset()
/* debug purpose*/
void taitowlf_state::palette_init()
{
- palette_set_color(machine(),0x70,MAKE_RGB(0xff,0xff,0xff));
- palette_set_color(machine(),0x71,MAKE_RGB(0xff,0xff,0xff));
- palette_set_color(machine(),0x01,MAKE_RGB(0x55,0x00,0x00));
- palette_set_color(machine(),0x10,MAKE_RGB(0xaa,0x00,0x00));
- palette_set_color(machine(),0x00,MAKE_RGB(0x00,0x00,0x00));
+ palette_set_color(machine(),0x70,rgb_t(0xff,0xff,0xff));
+ palette_set_color(machine(),0x71,rgb_t(0xff,0xff,0xff));
+ palette_set_color(machine(),0x01,rgb_t(0x55,0x00,0x00));
+ palette_set_color(machine(),0x10,rgb_t(0xaa,0x00,0x00));
+ palette_set_color(machine(),0x00,rgb_t(0x00,0x00,0x00));
}
#endif
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index 84cf33c8b68..ab9b5f5f30d 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -155,7 +155,7 @@ void tankbust_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
r = 0x55 * bit0 + 0xaa * bit1;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c
index 88f9bb7fcf4..41e5c145aa9 100644
--- a/src/mame/drivers/tapatune.c
+++ b/src/mame/drivers/tapatune.c
@@ -140,7 +140,7 @@ void tapatune_state::machine_reset()
*
*************************************/
-const pen_t* get_pens(tapatune_state *state)
+const rgb_t* get_pens(tapatune_state *state)
{
for (UINT32 i = 0; i < 0x100; i++)
{
@@ -152,7 +152,7 @@ const pen_t* get_pens(tapatune_state *state)
g = pal6bit(g);
b = pal6bit(b);
- state->m_pens[i] = MAKE_RGB(r, g, b);
+ state->m_pens[i] = rgb_t(r, g, b);
}
return state->m_pens;
@@ -174,7 +174,7 @@ static MC6845_UPDATE_ROW( update_row )
{
tapatune_state *state = device->machine().driver_data<tapatune_state>();
UINT32 *dest = &bitmap.pix32(y);
- pen_t *pens = (pen_t *)param;
+ rgb_t *pens = (rgb_t *)param;
offs_t offs = (ma*2 + ra*0x40)*4;
UINT8 *videoram = reinterpret_cast<UINT8 *>(state->m_videoram.target());
diff --git a/src/mame/drivers/tattack.c b/src/mame/drivers/tattack.c
index c09392eb781..647a34458fb 100644
--- a/src/mame/drivers/tattack.c
+++ b/src/mame/drivers/tattack.c
@@ -194,8 +194,8 @@ void tattack_state::palette_init()
else
r=g=b=128;
- palette_set_color(machine(),2*i,MAKE_RGB(0x00,0x00,0x00));
- palette_set_color(machine(),2*i+1,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),2*i,rgb_t(0x00,0x00,0x00));
+ palette_set_color(machine(),2*i+1,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/taxidriv.c b/src/mame/drivers/taxidriv.c
index 34cbc5db676..78d22e51680 100644
--- a/src/mame/drivers/taxidriv.c
+++ b/src/mame/drivers/taxidriv.c
@@ -382,7 +382,7 @@ void taxidriv_state::palette_init()
bit1 = (color_prom[0] >> 5) & 0x01;
b = 0x55 * bit0 + 0xaa * bit1;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/drivers/tgtpanic.c b/src/mame/drivers/tgtpanic.c
index e83bcdb30aa..53b0ff69aa4 100644
--- a/src/mame/drivers/tgtpanic.c
+++ b/src/mame/drivers/tgtpanic.c
@@ -43,8 +43,8 @@ UINT32 tgtpanic_state::screen_update_tgtpanic(screen_device &screen, bitmap_rgb3
colors[0] = 0;
colors[1] = 0xffffffff;
- colors[2] = MAKE_RGB(pal1bit(m_color >> 2), pal1bit(m_color >> 1), pal1bit(m_color >> 0));
- colors[3] = MAKE_RGB(pal1bit(m_color >> 6), pal1bit(m_color >> 5), pal1bit(m_color >> 4));
+ colors[2] = rgb_t(pal1bit(m_color >> 2), pal1bit(m_color >> 1), pal1bit(m_color >> 0));
+ colors[3] = rgb_t(pal1bit(m_color >> 6), pal1bit(m_color >> 5), pal1bit(m_color >> 4));
for (offs = 0; offs < 0x2000; ++offs)
{
diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c
index f20c2412c56..c228e0ae9ae 100644
--- a/src/mame/drivers/tmaster.c
+++ b/src/mame/drivers/tmaster.c
@@ -636,7 +636,7 @@ WRITE16_MEMBER(tmaster_state::galgames_palette_data_w)
{
int palette_base;
for (palette_base = 0; palette_base < 0x1000; palette_base += 0x100)
- palette_set_color(machine(), m_palette_offset + palette_base, MAKE_RGB(m_palette_data[0], m_palette_data[1], m_palette_data[2]));
+ palette_set_color(machine(), m_palette_offset + palette_base, rgb_t(m_palette_data[0], m_palette_data[1], m_palette_data[2]));
m_palette_index = 0;
m_palette_offset++;
}
diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c
index 1e64993f9c4..1440071813c 100644
--- a/src/mame/drivers/tmmjprd.c
+++ b/src/mame/drivers/tmmjprd.c
@@ -633,7 +633,7 @@ WRITE32_MEMBER(tmmjprd_state::tmmjprd_paletteram_dword_w)
r = ((m_generic_paletteram_32[offset] & 0x0000ff00) >>8);
g = ((m_generic_paletteram_32[offset] & 0x00ff0000) >>16);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c
index fea7fbdb0bf..136015ed3f6 100644
--- a/src/mame/drivers/toratora.c
+++ b/src/mame/drivers/toratora.c
@@ -103,7 +103,7 @@ UINT32 toratora_state::screen_update_toratora(screen_device &screen, bitmap_rgb3
for (i = 0; i < 8; i++)
{
- pen_t pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK;
+ pen_t pen = (data & 0x80) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x) = pen;
data = data << 1;
diff --git a/src/mame/drivers/triplhnt.c b/src/mame/drivers/triplhnt.c
index 26b70135da4..3b103d1dbd5 100644
--- a/src/mame/drivers/triplhnt.c
+++ b/src/mame/drivers/triplhnt.c
@@ -291,14 +291,14 @@ GFXDECODE_END
void triplhnt_state::palette_init()
{
- palette_set_color(machine(), 0, MAKE_RGB(0xAF, 0xAF, 0xAF)); /* sprites */
- palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 2, MAKE_RGB(0xFF, 0xFF, 0xFF));
- palette_set_color(machine(), 3, MAKE_RGB(0x50, 0x50, 0x50));
- palette_set_color(machine(), 4, MAKE_RGB(0x00, 0x00, 0x00)); /* tiles */
- palette_set_color(machine(), 5, MAKE_RGB(0x3F, 0x3F, 0x3F));
- palette_set_color(machine(), 6, MAKE_RGB(0x00, 0x00, 0x00));
- palette_set_color(machine(), 7, MAKE_RGB(0x3F, 0x3F, 0x3F));
+ palette_set_color(machine(), 0, rgb_t(0xAF, 0xAF, 0xAF)); /* sprites */
+ palette_set_color(machine(), 1, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 2, rgb_t(0xFF, 0xFF, 0xFF));
+ palette_set_color(machine(), 3, rgb_t(0x50, 0x50, 0x50));
+ palette_set_color(machine(), 4, rgb_t(0x00, 0x00, 0x00)); /* tiles */
+ palette_set_color(machine(), 5, rgb_t(0x3F, 0x3F, 0x3F));
+ palette_set_color(machine(), 6, rgb_t(0x00, 0x00, 0x00));
+ palette_set_color(machine(), 7, rgb_t(0x3F, 0x3F, 0x3F));
}
diff --git a/src/mame/drivers/tugboat.c b/src/mame/drivers/tugboat.c
index 908df098a53..edd9b3ee6d9 100644
--- a/src/mame/drivers/tugboat.c
+++ b/src/mame/drivers/tugboat.c
@@ -101,7 +101,7 @@ void tugboat_state::palette_init()
g = brt * ((color_prom[i] >> 1) & 0x01);
b = brt * ((color_prom[i] >> 2) & 0x01);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c
index 9c454df3681..77622508550 100644
--- a/src/mame/drivers/ultrsprt.c
+++ b/src/mame/drivers/ultrsprt.c
@@ -81,8 +81,8 @@ WRITE32_MEMBER(ultrsprt_state::palette_w)
COMBINE_DATA(&m_generic_paletteram_32[offset]);
data = m_generic_paletteram_32[offset];
- palette_set_color(machine(), (offset*2)+0, MAKE_RGB(pal5bit(data >> 26), pal5bit(data >> 21), pal5bit(data >> 16)));
- palette_set_color(machine(), (offset*2)+1, MAKE_RGB(pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)));
+ palette_set_color(machine(), (offset*2)+0, rgb_t(pal5bit(data >> 26), pal5bit(data >> 21), pal5bit(data >> 16)));
+ palette_set_color(machine(), (offset*2)+1, rgb_t(pal5bit(data >> 10), pal5bit(data >> 5), pal5bit(data >> 0)));
}
diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c
index e179aa3b277..cd0a5fa91c2 100644
--- a/src/mame/drivers/undrfire.c
+++ b/src/mame/drivers/undrfire.c
@@ -216,7 +216,7 @@ WRITE32_MEMBER(undrfire_state::color_ram_w)
g = (a & 0xff00) >> 8;
b = (a & 0xff);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/vega.c b/src/mame/drivers/vega.c
index c1a46d09f72..f16957ae4f4 100644
--- a/src/mame/drivers/vega.c
+++ b/src/mame/drivers/vega.c
@@ -486,8 +486,8 @@ void vega_state::palette_init()
int i;
for(i=0;i<8;++i)
{
- palette_set_color( machine(),2*i, MAKE_RGB(0x00, 0x00, 0x00) );
- palette_set_color( machine(),2*i+1, MAKE_RGB( (i&1)?0xff:0x00, (i&2)?0xff:0x00, (i&4)?0xff:0x00) );
+ palette_set_color( machine(),2*i, rgb_t(0x00, 0x00, 0x00) );
+ palette_set_color( machine(),2*i+1, rgb_t( (i&1)?0xff:0x00, (i&2)?0xff:0x00, (i&4)?0xff:0x00) );
}
}
diff --git a/src/mame/drivers/videopkr.c b/src/mame/drivers/videopkr.c
index 8cdc9bd53ac..40ed3403b65 100644
--- a/src/mame/drivers/videopkr.c
+++ b/src/mame/drivers/videopkr.c
@@ -441,7 +441,7 @@ void videopkr_state::palette_init()
tb = 0xf0 - (0xf0 * ((color_prom[j] >> 2) & 0x01));
b = tb - (i * (tb / 5));
- palette_set_color(machine(), j, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), j, rgb_t(r, g, b));
}
}
@@ -472,7 +472,7 @@ PALETTE_INIT_MEMBER(videopkr_state,babypkr)
tb = 0xdf * ((color_prom[j] >> 2) & 0x01);
b = top - ((tb * top) / 0x100);
- palette_set_color(machine(), j, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), j, rgb_t(r, g, b));
}
}
@@ -505,7 +505,7 @@ PALETTE_INIT_MEMBER(videopkr_state,fortune1)
if ((c % 4) == 1 || (c % 4) == 2)
c = ((int)(c / 4) * 4) + (3 - (c % 4));
- palette_set_color(machine(), c, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), c, rgb_t(r, g, b));
}
}
diff --git a/src/mame/drivers/vpoker.c b/src/mame/drivers/vpoker.c
index 1a5aae848f9..30b16428740 100644
--- a/src/mame/drivers/vpoker.c
+++ b/src/mame/drivers/vpoker.c
@@ -638,7 +638,7 @@ void vpoker_state::palette_init()
{
rgb_t color;
- color = MAKE_RGB(pal1bit((i & 4) >> 2),pal1bit(i & 1),pal1bit((i & 2) >> 1));
+ color = rgb_t(pal1bit((i & 4) >> 2),pal1bit(i & 1),pal1bit((i & 2) >> 1));
palette_set_color(machine(), i, color);
}
diff --git a/src/mame/drivers/wallc.c b/src/mame/drivers/wallc.c
index c7c5f0d1f8b..493d9464ca5 100644
--- a/src/mame/drivers/wallc.c
+++ b/src/mame/drivers/wallc.c
@@ -137,7 +137,7 @@ void wallc_state::palette_init()
bit7 = (color_prom[i] >> 7) & 0x01;
b = combine_3_weights(weights_b, bit7, bit1, bit0);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/warpsped.c b/src/mame/drivers/warpsped.c
index 79395dc7b6e..9ef90fb296e 100644
--- a/src/mame/drivers/warpsped.c
+++ b/src/mame/drivers/warpsped.c
@@ -294,8 +294,8 @@ GFXDECODE_END
void warpspeed_state::palette_init()
{
// tilemaps
- palette_set_color(machine(),0,RGB_BLACK); /* black */
- palette_set_color(machine(),1,RGB_WHITE); /* white */
+ palette_set_color(machine(),0,rgb_t::black); /* black */
+ palette_set_color(machine(),1,rgb_t::white); /* white */
// circles
for ( int i = 0; i < 8; i++ )
diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c
index 43fd0b65782..4d502129003 100644
--- a/src/mame/drivers/wheelfir.c
+++ b/src/mame/drivers/wheelfir.c
@@ -625,7 +625,7 @@ WRITE16_MEMBER(wheelfir_state::pal_data_w)
int r = m_palette[color*3];
int g = m_palette[color*3+1];
int b = m_palette[color*3+2];
- palette_set_color(machine(), color, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), color, rgb_t(r,g,b));
}
}
diff --git a/src/mame/drivers/wpc_dot.c b/src/mame/drivers/wpc_dot.c
index 433e3dbf12a..9a7e937cac6 100644
--- a/src/mame/drivers/wpc_dot.c
+++ b/src/mame/drivers/wpc_dot.c
@@ -283,9 +283,9 @@ UINT32 wpc_dot_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
for(bit=0;bit<8;bit++) // bits
{
if(m_dmdram[offset] & (1<<bit))
- col = MAKE_RGB(0xff,0xaa,0x00);
+ col = rgb_t(0xff,0xaa,0x00);
else
- col = MAKE_RGB(0x00,0x00,0x00);
+ col = rgb_t(0x00,0x00,0x00);
bitmap.pix32(y,x+bit) = col;
}
offset++;
diff --git a/src/mame/drivers/zac2650.c b/src/mame/drivers/zac2650.c
index d6b13ee3430..a81670acb99 100644
--- a/src/mame/drivers/zac2650.c
+++ b/src/mame/drivers/zac2650.c
@@ -187,10 +187,10 @@ INPUT_PORTS_END
void zac2650_state::palette_init()
{
- palette_set_color(machine(),0,RGB_BLACK);
- palette_set_color(machine(),1,RGB_WHITE);
- palette_set_color(machine(),2,RGB_BLACK);
- palette_set_color(machine(),3,RGB_BLACK);
+ palette_set_color(machine(),0,rgb_t::black);
+ palette_set_color(machine(),1,rgb_t::white);
+ palette_set_color(machine(),2,rgb_t::black);
+ palette_set_color(machine(),3,rgb_t::black);
}
/************************************************************************************************
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index c1ff79a24ab..ee2989b5a58 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -455,7 +455,7 @@ public:
/* playfield states */
int m_last_scanline;
- int m_ham_color;
+ rgb_t m_ham_color;
/* misc states */
UINT16 m_genlock_color;
@@ -465,7 +465,7 @@ public:
/* aga */
int m_aga_diwhigh_written;
- pen_t m_aga_palette[256];
+ rgb_t m_aga_palette[256];
UINT64 m_aga_bpldat[8];
UINT16 m_aga_sprdata[8][4];
UINT16 m_aga_sprdatb[8][4];
diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h
index 2a295cee7c9..97c6f1c66c7 100644
--- a/src/mame/includes/psikyosh.h
+++ b/src/mame/includes/psikyosh.h
@@ -13,7 +13,7 @@
#define BG_TYPE(n) (((m_vidregs[6] << (8*n)) & 0x7f000000 ) >> 24)
#define BG_LINE(n) (((m_vidregs[6] << (8*n)) & 0x80000000 ) ? 1:0)
-#define BG_TRANSPEN MAKE_ARGB(0x00,0xff,0x00,0xff) // used for representing transparency in temporary bitmaps
+#define BG_TRANSPEN rgb_t(0x00,0xff,0x00,0xff) // used for representing transparency in temporary bitmaps
#define SPRITE_PRI(n) (((m_vidregs[2] << (4*n)) & 0xf0000000 ) >> 28)
diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h
index b759e1617a3..74fa8e23ccb 100644
--- a/src/mame/includes/stv.h
+++ b/src/mame/includes/stv.h
@@ -352,7 +352,7 @@ public:
void stv_vdp2_draw_mosaic(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 is_roz);
void stv_vdp2_fade_effects( void );
void stv_vdp2_compute_color_offset( int *r, int *g, int *b, int cor );
- void stv_vdp2_compute_color_offset_UINT32(UINT32 *rgb, int cor);
+ void stv_vdp2_compute_color_offset_UINT32(rgb_t *rgb, int cor);
void stv_vdp2_check_fade_control_for_layer( void );
void stv_vdp2_draw_line(bitmap_rgb32 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/machine/atarifb.c b/src/mame/machine/atarifb.c
index 960313fea11..56de399f043 100644
--- a/src/mame/machine/atarifb.c
+++ b/src/mame/machine/atarifb.c
@@ -45,14 +45,14 @@ WRITE8_MEMBER(atarifb_state::abaseb_out1_w)
if (data & 0x80)
{
/* Invert video */
- palette_set_color(machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 1, rgb_t(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 0, rgb_t(0xff,0xff,0xff)); /* white */
}
else
{
/* Regular video */
- palette_set_color(machine(), 0, MAKE_RGB(0x00,0x00,0x00)); /* black */
- palette_set_color(machine(), 1, MAKE_RGB(0xff,0xff,0xff)); /* white */
+ palette_set_color(machine(), 0, rgb_t(0x00,0x00,0x00)); /* black */
+ palette_set_color(machine(), 1, rgb_t(0xff,0xff,0xff)); /* white */
}
}
diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c
index 5c04bf44439..5e5d7f4825d 100644
--- a/src/mame/machine/megadriv.c
+++ b/src/mame/machine/megadriv.c
@@ -839,7 +839,7 @@ UINT32 md_base_state::screen_update_megadriv(screen_device &screen, bitmap_rgb32
for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
UINT16 src = srcy[x];
- desty[x] = MAKE_RGB(pal5bit(src >> 10), pal5bit(src >> 5), pal5bit(src >> 0));
+ desty[x] = rgb_t(pal5bit(src >> 10), pal5bit(src >> 5), pal5bit(src >> 0));
}
}
diff --git a/src/mame/machine/nitedrvr.c b/src/mame/machine/nitedrvr.c
index 2b5d59e8d72..260d28b5ef2 100644
--- a/src/mame/machine/nitedrvr.c
+++ b/src/mame/machine/nitedrvr.c
@@ -238,8 +238,8 @@ WRITE8_MEMBER(nitedrvr_state::nitedrvr_out1_w)
m_crash_data_en = 1;
m_crash_data = 0x0f;
/* Invert video */
- palette_set_color(machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- palette_set_color(machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ palette_set_color(machine(), 1, rgb_t(0x00,0x00,0x00)); /* BLACK */
+ palette_set_color(machine(), 0, rgb_t(0xff,0xff,0xff)); /* WHITE */
}
discrete_sound_w(m_discrete, space, NITEDRVR_BANG_DATA, m_crash_data_en ? m_crash_data : 0); // Crash Volume
}
@@ -258,14 +258,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(nitedrvr_state::nitedrvr_crash_toggle_callback)
if (m_crash_data & 0x01)
{
/* Invert video */
- palette_set_color(machine(), 1, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- palette_set_color(machine(), 0, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ palette_set_color(machine(), 1, rgb_t(0x00,0x00,0x00)); /* BLACK */
+ palette_set_color(machine(), 0, rgb_t(0xff,0xff,0xff)); /* WHITE */
}
else
{
/* Normal video */
- palette_set_color(machine(), 0, MAKE_RGB(0x00,0x00,0x00)); /* BLACK */
- palette_set_color(machine(), 1, MAKE_RGB(0xff,0xff,0xff)); /* WHITE */
+ palette_set_color(machine(), 0, rgb_t(0x00,0x00,0x00)); /* BLACK */
+ palette_set_color(machine(), 1, rgb_t(0xff,0xff,0xff)); /* WHITE */
}
}
}
diff --git a/src/mame/machine/segamsys.c b/src/mame/machine/segamsys.c
index bb07a081258..b0f06f0fef7 100644
--- a/src/mame/machine/segamsys.c
+++ b/src/mame/machine/segamsys.c
@@ -524,7 +524,7 @@ static void vdp_data_w(address_space &space, UINT8 data, struct sms_vdp* chip)
r = (palword & 0x000f)>>0;
g = (palword & 0x00f0)>>4;
b = (palword & 0x0f00)>>8;
- rgb_t rgb = MAKE_RGB(pal4bit(r), pal4bit(g), pal4bit(b));
+ rgb_t rgb = rgb_t(pal4bit(r), pal4bit(g), pal4bit(b));
//palette_set_color(space.machine(),(chip->addr_reg&0x3e)/2, rgb);
chip->cram_mamecolours[(chip->addr_reg&0x3e)/2]=rgb;
}
@@ -540,7 +540,7 @@ static void vdp_data_w(address_space &space, UINT8 data, struct sms_vdp* chip)
r = (data & 0x03)>>0;
g = (data & 0x0c)>>2;
b = (data & 0x30)>>4;
- rgb_t rgb = MAKE_RGB(pal2bit(r), pal2bit(g), pal2bit(b));
+ rgb_t rgb = rgb_t(pal2bit(r), pal2bit(g), pal2bit(b));
//palette_set_color(space.machine(),chip->addr_reg&0x1f, rgb);
chip->cram_mamecolours[chip->addr_reg&0x1f]=rgb;
}
diff --git a/src/mame/machine/vectrex.c b/src/mame/machine/vectrex.c
index fe275471cce..04a198f1a13 100644
--- a/src/mame/machine/vectrex.c
+++ b/src/mame/machine/vectrex.c
@@ -5,10 +5,10 @@
#include "includes/vectrex.h"
-#define VC_RED MAKE_RGB(0xff, 0x00, 0x00)
-#define VC_GREEN MAKE_RGB(0x00, 0xff, 0x00)
-#define VC_BLUE MAKE_RGB(0x00, 0x00, 0xff)
-#define VC_DARKRED MAKE_RGB(0x80, 0x00, 0x00)
+#define VC_RED rgb_t(0xff, 0x00, 0x00)
+#define VC_GREEN rgb_t(0x00, 0xff, 0x00)
+#define VC_BLUE rgb_t(0x00, 0x00, 0xff)
+#define VC_DARKRED rgb_t(0x80, 0x00, 0x00)
#define DAMPC (-0.2)
#define MMI (5.0)
@@ -176,7 +176,7 @@ void vectrex_state::vectrex_configuration()
switch ((cport >> 2) & 0x07)
{
case 0x00:
- m_imager_colors[0] = m_imager_colors[1] = m_imager_colors[2] = RGB_BLACK;
+ m_imager_colors[0] = m_imager_colors[1] = m_imager_colors[2] = rgb_t::black;
break;
case 0x01:
m_imager_colors[0] = m_imager_colors[1] = m_imager_colors[2] = VC_DARKRED;
@@ -206,7 +206,7 @@ void vectrex_state::vectrex_configuration()
switch ((cport >> 5) & 0x07)
{
case 0x00:
- m_imager_colors[3] = m_imager_colors[4] = m_imager_colors[5] = RGB_BLACK;
+ m_imager_colors[3] = m_imager_colors[4] = m_imager_colors[5] = rgb_t::black;
break;
case 0x01:
m_imager_colors[3] = m_imager_colors[4] = m_imager_colors[5] = VC_DARKRED;
@@ -235,8 +235,8 @@ void vectrex_state::vectrex_configuration()
else
{
vector_add_point_function = &vectrex_state::vectrex_add_point;
- m_beam_color = RGB_WHITE;
- m_imager_colors[0] = m_imager_colors[1] = m_imager_colors[2] = m_imager_colors[3] = m_imager_colors[4] = m_imager_colors[5] = RGB_WHITE;
+ m_beam_color = rgb_t::white;
+ m_imager_colors[0] = m_imager_colors[1] = m_imager_colors[2] = m_imager_colors[3] = m_imager_colors[4] = m_imager_colors[5] = rgb_t::white;
}
m_lightpen_port = m_io_lpenconf->read() & 0x03;
}
@@ -381,9 +381,9 @@ DRIVER_INIT_MEMBER(vectrex_state,vectrex)
m_64k_cart = 0;
m_imager_angles = unknown_game_angles;
- m_beam_color = RGB_WHITE;
+ m_beam_color = rgb_t::white;
for (i=0; i<ARRAY_LENGTH(m_imager_colors); i++)
- m_imager_colors[i] = RGB_WHITE;
+ m_imager_colors[i] = rgb_t::white;
/*
* Minestorm's PRNG doesn't work with a 0 seed (mines in the first
diff --git a/src/mame/video/1942.c b/src/mame/video/1942.c
index 886a6b8a4c4..39bf20070aa 100644
--- a/src/mame/video/1942.c
+++ b/src/mame/video/1942.c
@@ -54,7 +54,7 @@ void _1942_state::create_palette()
bit3 = (color_prom[i + 2 * 256] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- colortable_palette_set_color(machine().colortable,i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/1943.c b/src/mame/video/1943.c
index b0a35815912..4c86effe40d 100644
--- a/src/mame/video/1943.c
+++ b/src/mame/video/1943.c
@@ -79,7 +79,7 @@ void _1943_state::palette_init()
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/20pacgal.c b/src/mame/video/20pacgal.c
index 83de35a1e2d..4a2206459bf 100644
--- a/src/mame/video/20pacgal.c
+++ b/src/mame/video/20pacgal.c
@@ -49,7 +49,7 @@ void _20pacgal_state::get_pens(pen_t *pens)
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- pens[offs] = MAKE_RGB(r, g, b);
+ pens[offs] = rgb_t(r, g, b);
color_prom++;
}
@@ -68,7 +68,7 @@ void _20pacgal_state::get_pens(pen_t *pens)
bits = (offs >> 4) & 0x03;
b = map[bits];
- pens[NUM_PENS + offs] = MAKE_RGB(r, g, b);
+ pens[NUM_PENS + offs] = rgb_t(r, g, b);
}
}
diff --git a/src/mame/video/40love.c b/src/mame/video/40love.c
index d131f3483fa..07e8fd5eed1 100644
--- a/src/mame/video/40love.c
+++ b/src/mame/video/40love.c
@@ -40,7 +40,7 @@ void fortyl_state::palette_init()
bit3 = (color_prom[2*machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/video/8080bw.c b/src/mame/video/8080bw.c
index 729304df65d..89d136a4497 100644
--- a/src/mame/video/8080bw.c
+++ b/src/mame/video/8080bw.c
@@ -48,7 +48,7 @@ void _8080bw_state::invadpt2_get_pens( pen_t *pens )
for (i = 0; i < NUM_PENS; i++)
{
- pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1));
+ pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1));
}
}
@@ -57,11 +57,11 @@ void _8080bw_state::sflush_get_pens( pen_t *pens )
{
offs_t i;
- pens[0] = MAKE_RGB(0x80, 0x80, 0xff);
+ pens[0] = rgb_t(0x80, 0x80, 0xff);
for (i = 1; i < NUM_PENS; i++)
{
- pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1));
+ pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 2), pal1bit(i >> 1));
}
}
@@ -72,7 +72,7 @@ void _8080bw_state::cosmo_get_pens( pen_t *pens )
for (i = 0; i < NUM_PENS; i++)
{
- pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
}
}
@@ -451,7 +451,7 @@ UINT32 _8080bw_state::screen_update_sflush(screen_device &screen, bitmap_rgb32 &
UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- pen_t pens[2] = { RGB_BLACK, RGB_WHITE };
+ pen_t pens[2] = { rgb_t::black, rgb_t::white };
offs_t offs;
for (offs = 0; offs < m_main_ram.bytes(); offs++)
@@ -479,7 +479,7 @@ UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32
UINT32 _8080bw_state::screen_update_spacecom(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- pen_t pens[2] = { RGB_BLACK, RGB_WHITE };
+ pen_t pens[2] = { rgb_t::black, rgb_t::white };
offs_t offs;
for (offs = 0; offs < 0x1c00; offs++)
diff --git a/src/mame/video/aerofgt.c b/src/mame/video/aerofgt.c
index 5530467d1f5..e836e84e7b3 100644
--- a/src/mame/video/aerofgt.c
+++ b/src/mame/video/aerofgt.c
@@ -702,7 +702,7 @@ void aerofgt_state::wbbc97_draw_bitmap( bitmap_rgb32 &bitmap )
int color = m_bitmapram[count] >> 1;
/* data is GRB; convert to RGB */
- rgb_t pen = MAKE_RGB(pal5bit((color & 0x3e0) >> 5), pal5bit((color & 0x7c00) >> 10), pal5bit(color & 0x1f));
+ rgb_t pen = rgb_t(pal5bit((color & 0x3e0) >> 5), pal5bit((color & 0x7c00) >> 10), pal5bit(color & 0x1f));
bitmap.pix32(y, (10 + x - m_rasterram[(y & 0x7f)]) & 0x1ff) = pen;
count++;
diff --git a/src/mame/video/alpha68k.c b/src/mame/video/alpha68k.c
index 5ebc86dcf50..3e4f470c713 100644
--- a/src/mame/video/alpha68k.c
+++ b/src/mame/video/alpha68k.c
@@ -382,7 +382,7 @@ PALETTE_INIT_MEMBER(alpha68k_state,kyros)
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
@@ -410,7 +410,7 @@ PALETTE_INIT_MEMBER(alpha68k_state,paddlem)
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/ambush.c b/src/mame/video/ambush.c
index 01356d5a7d0..41df1a27c00 100644
--- a/src/mame/video/ambush.c
+++ b/src/mame/video/ambush.c
@@ -43,7 +43,7 @@ void ambush_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/amigaaga.c b/src/mame/video/amigaaga.c
index 07c5cde3135..9b87d779af7 100644
--- a/src/mame/video/amigaaga.c
+++ b/src/mame/video/amigaaga.c
@@ -37,7 +37,7 @@ To do:
void amiga_aga_palette_write(running_machine &machine, int color_reg, UINT16 data)
{
amiga_state *state = machine.driver_data<amiga_state>();
- pen_t *aga_palette = state->m_aga_palette;
+ rgb_t *aga_palette = state->m_aga_palette;
int r,g,b;
int cr,cg,cb;
int color;
@@ -46,9 +46,9 @@ void amiga_aga_palette_write(running_machine &machine, int color_reg, UINT16 dat
r = (data & 0xf00) >> 8;
g = (data & 0x0f0) >> 4;
b = (data & 0x00f) >> 0;
- cr = RGB_RED(aga_palette[color]);
- cg = RGB_GREEN(aga_palette[color]);
- cb = RGB_BLUE(aga_palette[color]);
+ cr = aga_palette[color].r();
+ cg = aga_palette[color].g();
+ cb = aga_palette[color].b();
if (BIT(CUSTOM_REG(REG_BPLCON3),9))
{
// load low nibbles
@@ -62,7 +62,7 @@ void amiga_aga_palette_write(running_machine &machine, int color_reg, UINT16 dat
cg = (g << 4) | g;
cb = (b << 4) | b;
}
- aga_palette[color] = MAKE_RGB(cr,cg,cb);
+ aga_palette[color] = rgb_t(cr,cg,cb);
}
/*************************************
@@ -411,7 +411,7 @@ void amiga_aga_diwhigh_written(running_machine &machine, int written)
*
*************************************/
-INLINE int update_ham(amiga_state *state, int newpix)
+INLINE rgb_t update_ham(amiga_state *state, int newpix)
{
switch (newpix & 0x03)
{
@@ -420,15 +420,15 @@ INLINE int update_ham(amiga_state *state, int newpix)
break;
case 1:
- state->m_ham_color = MAKE_RGB(RGB_RED(state->m_ham_color), RGB_GREEN(state->m_ham_color), (newpix & 0xfc) | (RGB_BLUE(state->m_ham_color) & 0x03));
+ state->m_ham_color = rgb_t(state->m_ham_color.r(), state->m_ham_color.g(), (newpix & 0xfc) | (state->m_ham_color.b() & 0x03));
break;
case 2:
- state->m_ham_color = MAKE_RGB((newpix & 0xfc) | (RGB_RED(state->m_ham_color) & 0x03), RGB_GREEN(state->m_ham_color), RGB_BLUE(state->m_ham_color));
+ state->m_ham_color = rgb_t((newpix & 0xfc) | (state->m_ham_color.r() & 0x03), state->m_ham_color.g(), state->m_ham_color.b());
break;
case 3:
- state->m_ham_color = MAKE_RGB(RGB_RED(state->m_ham_color), (newpix & 0xfc) | (RGB_GREEN(state->m_ham_color) & 0x03), RGB_BLUE(state->m_ham_color));
+ state->m_ham_color = rgb_t(state->m_ham_color.r(), (newpix & 0xfc) | (state->m_ham_color.g() & 0x03), state->m_ham_color.b());
break;
}
return state->m_ham_color;
@@ -461,7 +461,7 @@ void amiga_aga_render_scanline(running_machine &machine, bitmap_rgb32 &bitmap, i
int next_copper_x;
int pl;
int defbitoffs = 0;
- pen_t *aga_palette = state->m_aga_palette;
+ rgb_t *aga_palette = state->m_aga_palette;
state->m_last_scanline = scanline;
diff --git a/src/mame/video/ampoker2.c b/src/mame/video/ampoker2.c
index 41c358b7d2c..bb567d0acb0 100644
--- a/src/mame/video/ampoker2.c
+++ b/src/mame/video/ampoker2.c
@@ -108,7 +108,7 @@ void ampoker2_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
r = combine_3_weights(weights_r, bit0, bit1, bit2);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/appoooh.c b/src/mame/video/appoooh.c
index 9e05de25269..3331228c681 100644
--- a/src/mame/video/appoooh.c
+++ b/src/mame/video/appoooh.c
@@ -55,7 +55,7 @@ PALETTE_INIT_MEMBER(appoooh_state,appoooh)
bit2 = (color_prom[pen] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -88,7 +88,7 @@ PALETTE_INIT_MEMBER(appoooh_state,robowres)
bit2 = (color_prom[pen] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/arabian.c b/src/mame/video/arabian.c
index 4268fe936e1..434c1929c0b 100644
--- a/src/mame/video/arabian.c
+++ b/src/mame/video/arabian.c
@@ -139,7 +139,7 @@ void arabian_state::palette_init()
b = (bhi * 192) + (bbase * 63);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/argus.c b/src/mame/video/argus.c
index 9356201c89f..e265b281ea7 100644
--- a/src/mame/video/argus.c
+++ b/src/mame/video/argus.c
@@ -390,7 +390,7 @@ void argus_state::argus_change_bg_palette(int color, int lo_offs, int hi_offs)
ib = pal4bit(m_palette_intensity >> 4);
ix = m_palette_intensity & 0x0f;
- irgb = MAKE_RGB(ir,ig,ib);
+ irgb = rgb_t(ir,ig,ib);
lo = m_paletteram[lo_offs];
hi = m_paletteram[hi_offs];
@@ -404,11 +404,11 @@ void argus_state::argus_change_bg_palette(int color, int lo_offs, int hi_offs)
if (m_bg_status & 2)
{
UINT8 val = (r + g + b) / 3;
- rgb = MAKE_RGB(val,val,val);
+ rgb = rgb_t(val,val,val);
}
else
{
- rgb = MAKE_RGB(r,g,b);
+ rgb = rgb_t(r,g,b);
}
rgb = jal_blend_func(rgb,irgb,ix);
diff --git a/src/mame/video/astrocde.c b/src/mame/video/astrocde.c
index df6c59245b1..bb20e4cbb59 100644
--- a/src/mame/video/astrocde.c
+++ b/src/mame/video/astrocde.c
@@ -104,7 +104,7 @@ void astrocde_state::palette_init()
g = MIN(g, 255);
b = MAX(b, 0);
b = MIN(b, 255);
- palette_set_color(machine(), color * 16 + luma, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), color * 16 + luma, rgb_t(r, g, b));
}
}
}
@@ -150,7 +150,7 @@ PALETTE_INIT_MEMBER(astrocde_state,profpac)
bit3 = (i >> 11) & 0x01;
r = combine_4_weights(weights, bit0, bit1, bit2, bit3);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/atarisy2.c b/src/mame/video/atarisy2.c
index 19e4b691a1a..a59f265896b 100644
--- a/src/mame/video/atarisy2.c
+++ b/src/mame/video/atarisy2.c
@@ -194,7 +194,7 @@ WRITE16_MEMBER( atarisy2_state::paletteram_w )
red = (color_table[(newword >> 12) & 15] * inten) >> 4;
green = (color_table[(newword >> 8) & 15] * inten) >> 4;
blue = (color_table[(newword >> 4) & 15] * inten) >> 4;
- palette_set_color(space.machine(), offset, MAKE_RGB(red, green, blue));
+ palette_set_color(space.machine(), offset, rgb_t(red, green, blue));
}
diff --git a/src/mame/video/avgdvg.c b/src/mame/video/avgdvg.c
index 5e93a61d90a..f6899000251 100644
--- a/src/mame/video/avgdvg.c
+++ b/src/mame/video/avgdvg.c
@@ -976,7 +976,7 @@ static int tempest_strobe3(vgdata *vg)
avg_apply_flipping(&x, &y);
vg_add_point_buf(y - ycenter + xcenter,
- x - xcenter + ycenter, MAKE_RGB(r, g, b),
+ x - xcenter + ycenter, rgb_t(r, g, b),
(((vg->int_latch >> 1) == 1)? vg->intensity: vg->int_latch & 0xe) << 4);
}
@@ -1026,7 +1026,7 @@ static int mhavoc_strobe3(vgdata *vg)
g = bit1 * 0xcb;
b = bit0 * 0xcb;
- vg_add_point_buf(vg->xpos, vg->ypos, MAKE_RGB(r, g, b),
+ vg_add_point_buf(vg->xpos, vg->ypos, rgb_t(r, g, b),
(((vg->int_latch >> 1) == 1)? vg->intensity: vg->int_latch & 0xe) << 4);
vg->spkl_shift = (((vg->spkl_shift & 0x40) >> 6)
^ ((vg->spkl_shift & 0x20) >> 5)
@@ -1051,7 +1051,7 @@ static int mhavoc_strobe3(vgdata *vg)
g = bit1 * 0xcb;
b = bit0 * 0xcb;
- vg_add_point_buf(vg->xpos, vg->ypos, MAKE_RGB(r, g, b),
+ vg_add_point_buf(vg->xpos, vg->ypos, rgb_t(r, g, b),
(((vg->int_latch >> 1) == 1)? vg->intensity: vg->int_latch & 0xe) << 4);
}
}
@@ -1114,7 +1114,7 @@ static int quantum_strobe3(vgdata *vg)
avg_apply_flipping(&x, &y);
vg_add_point_buf(y - ycenter + xcenter,
- x - xcenter + ycenter, MAKE_RGB(r, g, b),
+ x - xcenter + ycenter, rgb_t(r, g, b),
((vg->int_latch == 2)? vg->intensity: vg->int_latch) << 4);
}
if (OP2)
diff --git a/src/mame/video/bagman.c b/src/mame/video/bagman.c
index 51d0696126e..caacb2a7311 100644
--- a/src/mame/video/bagman.c
+++ b/src/mame/video/bagman.c
@@ -76,7 +76,7 @@ PALETTE_INIT_MEMBER(bagman_state,bagman)
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/bankp.c b/src/mame/video/bankp.c
index 96f49995ab5..e743ce07514 100644
--- a/src/mame/video/bankp.c
+++ b/src/mame/video/bankp.c
@@ -61,7 +61,7 @@ void bankp_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/video/baraduke.c b/src/mame/video/baraduke.c
index 28276d14b35..0dc470b8a86 100644
--- a/src/mame/video/baraduke.c
+++ b/src/mame/video/baraduke.c
@@ -44,7 +44,7 @@ void baraduke_state::palette_init()
bit3 = (color_prom[0] >> 7) & 0x01;
b = 0x0e*bit0 + 0x1f*bit1 + 0x43*bit2 + 0x8f*bit3;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/video/battlane.c b/src/mame/video/battlane.c
index d8efe02e66f..785e6821799 100644
--- a/src/mame/video/battlane.c
+++ b/src/mame/video/battlane.c
@@ -41,7 +41,7 @@ WRITE8_MEMBER(battlane_state::battlane_palette_w)
bit2 = (~data >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
WRITE8_MEMBER(battlane_state::battlane_scrollx_w)
diff --git a/src/mame/video/beezer.c b/src/mame/video/beezer.c
index 1c80b1273cd..ec606e93365 100644
--- a/src/mame/video/beezer.c
+++ b/src/mame/video/beezer.c
@@ -63,7 +63,7 @@ WRITE8_MEMBER(beezer_state::beezer_map_w)
bit1 = (data >> 7) & 0x01;
b = 0x5f * bit0 + 0xa0 * bit1;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
READ8_MEMBER(beezer_state::beezer_line_r)
diff --git a/src/mame/video/bfm_adr2.c b/src/mame/video/bfm_adr2.c
index 2adc840744a..25a942b7180 100644
--- a/src/mame/video/bfm_adr2.c
+++ b/src/mame/video/bfm_adr2.c
@@ -209,22 +209,22 @@ void bfm_adder2_device::device_start()
m_tilemap1 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(bfm_adder2_device::get_tile1_info),this), TILEMAP_SCAN_ROWS, 8, 8, 50, 35);
- palette_set_color(machine(), 0,MAKE_RGB(0x00,0x00,0x00));
- palette_set_color(machine(), 1,MAKE_RGB(0x00,0x00,0xFF));
- palette_set_color(machine(), 2,MAKE_RGB(0x00,0xFF,0x00));
- palette_set_color(machine(), 3,MAKE_RGB(0x00,0xFF,0xFF));
- palette_set_color(machine(), 4,MAKE_RGB(0xFF,0x00,0x00));
- palette_set_color(machine(), 5,MAKE_RGB(0xFF,0x00,0xFF));
- palette_set_color(machine(), 6,MAKE_RGB(0xFF,0xFF,0x00));
- palette_set_color(machine(), 7,MAKE_RGB(0xFF,0xFF,0xFF));
- palette_set_color(machine(), 8,MAKE_RGB(0x80,0x80,0x80));
- palette_set_color(machine(), 9,MAKE_RGB(0x00,0x00,0x80));
- palette_set_color(machine(),10,MAKE_RGB(0x00,0x80,0x00));
- palette_set_color(machine(),11,MAKE_RGB(0x00,0x80,0x80));
- palette_set_color(machine(),12,MAKE_RGB(0x80,0x00,0x00));
- palette_set_color(machine(),13,MAKE_RGB(0x80,0x00,0x80));
- palette_set_color(machine(),14,MAKE_RGB(0x80,0x80,0x00));
- palette_set_color(machine(),15,MAKE_RGB(0x80,0x80,0x80));
+ palette_set_color(machine(), 0,rgb_t(0x00,0x00,0x00));
+ palette_set_color(machine(), 1,rgb_t(0x00,0x00,0xFF));
+ palette_set_color(machine(), 2,rgb_t(0x00,0xFF,0x00));
+ palette_set_color(machine(), 3,rgb_t(0x00,0xFF,0xFF));
+ palette_set_color(machine(), 4,rgb_t(0xFF,0x00,0x00));
+ palette_set_color(machine(), 5,rgb_t(0xFF,0x00,0xFF));
+ palette_set_color(machine(), 6,rgb_t(0xFF,0xFF,0x00));
+ palette_set_color(machine(), 7,rgb_t(0xFF,0xFF,0xFF));
+ palette_set_color(machine(), 8,rgb_t(0x80,0x80,0x80));
+ palette_set_color(machine(), 9,rgb_t(0x00,0x00,0x80));
+ palette_set_color(machine(),10,rgb_t(0x00,0x80,0x00));
+ palette_set_color(machine(),11,rgb_t(0x00,0x80,0x80));
+ palette_set_color(machine(),12,rgb_t(0x80,0x00,0x00));
+ palette_set_color(machine(),13,rgb_t(0x80,0x00,0x80));
+ palette_set_color(machine(),14,rgb_t(0x80,0x80,0x00));
+ palette_set_color(machine(),15,rgb_t(0x80,0x80,0x80));
}
// video update ///////////////////////////////////////////////////////////
@@ -272,7 +272,7 @@ WRITE8_MEMBER( bfm_adder2_device::screen_ram_w )
r = ((data & 0x18)>>3) * 85; // 00011000b = 0x18
g = ((data & 0x06)>>1) * 85; // 00000110b = 0x06
b = ((data & 0x01) ) * 255;
- palette_set_color(space.machine(), pal, MAKE_RGB(r,g,b));
+ palette_set_color(space.machine(), pal, rgb_t(r,g,b));
}
if ( m_adder2_screen_page_reg & SL_ACCESS )
diff --git a/src/mame/video/bionicc.c b/src/mame/video/bionicc.c
index e26386335ed..e94a76357ef 100644
--- a/src/mame/video/bionicc.c
+++ b/src/mame/video/bionicc.c
@@ -142,7 +142,7 @@ WRITE16_MEMBER(bionicc_state::bionicc_paletteram_w)
b = b * (0x07 + bright) / 0x0e;
}
- palette_set_color (machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color (machine(), offset, rgb_t(r, g, b));
}
WRITE16_MEMBER(bionicc_state::bionicc_scroll_w)
diff --git a/src/mame/video/bking.c b/src/mame/video/bking.c
index 5276419c4bb..3bceba60cc1 100644
--- a/src/mame/video/bking.c
+++ b/src/mame/video/bking.c
@@ -78,7 +78,7 @@ void bking_state::palette_init()
bit1 = (color_prom[pen] >> 7) & 0x01;
b = combine_2_weights(gweights, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/bladestl.c b/src/mame/video/bladestl.c
index 2d5fce9266a..f447251d26c 100644
--- a/src/mame/video/bladestl.c
+++ b/src/mame/video/bladestl.c
@@ -32,7 +32,7 @@ static void set_pens( running_machine &machine )
{
UINT16 data = state->m_paletteram[i | 1] | (state->m_paletteram[i] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine.colortable, i >> 1, color);
}
diff --git a/src/mame/video/blockout.c b/src/mame/video/blockout.c
index d05a17305a8..42e9a0045ca 100644
--- a/src/mame/video/blockout.c
+++ b/src/mame/video/blockout.c
@@ -35,7 +35,7 @@ void blockout_state::setcolor( int color, int rgb )
bit3 = (rgb >> 11) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), color, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), color, rgb_t(r,g,b));
}
WRITE16_MEMBER(blockout_state::blockout_paletteram_w)
diff --git a/src/mame/video/blueprnt.c b/src/mame/video/blueprnt.c
index e60ae90eabf..594f55b9eb6 100644
--- a/src/mame/video/blueprnt.c
+++ b/src/mame/video/blueprnt.c
@@ -42,7 +42,7 @@ void blueprnt_state::palette_init()
g = ((pen >> 2) & 1) * ((pen & 0x08) ? 0xbf : 0xff);
b = ((pen >> 1) & 1) * ((pen & 0x08) ? 0xbf : 0xff);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/bogeyman.c b/src/mame/video/bogeyman.c
index 4d32f5cb6ad..6dd4418c2ae 100644
--- a/src/mame/video/bogeyman.c
+++ b/src/mame/video/bogeyman.c
@@ -31,7 +31,7 @@ void bogeyman_state::palette_init()
bit2 = (color_prom[256] >> 3) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i + 16, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i + 16, rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/video/bosco.c b/src/mame/video/bosco.c
index b0bbca9bfd7..132586cdaa9 100644
--- a/src/mame/video/bosco.c
+++ b/src/mame/video/bosco.c
@@ -40,7 +40,7 @@ PALETTE_INIT_MEMBER(bosco_state,bosco)
bit2 = ((*color_prom) >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable,i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,i,rgb_t(r,g,b));
color_prom++;
}
@@ -57,7 +57,7 @@ PALETTE_INIT_MEMBER(bosco_state,bosco)
bits = (i >> 4) & 0x03;
b = map[bits];
- colortable_palette_set_color(machine().colortable,32 + i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,32 + i,rgb_t(r,g,b));
}
/* characters / sprites */
diff --git a/src/mame/video/brkthru.c b/src/mame/video/brkthru.c
index 6d1f9b175f8..7f8154ab448 100644
--- a/src/mame/video/brkthru.c
+++ b/src/mame/video/brkthru.c
@@ -57,7 +57,7 @@ void brkthru_state::palette_init()
bit3 = (color_prom[machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/video/btime.c b/src/mame/video/btime.c
index 952dd635e5c..206a468c411 100644
--- a/src/mame/video/btime.c
+++ b/src/mame/video/btime.c
@@ -58,7 +58,7 @@ PALETTE_INIT_MEMBER(btime_state,btime)
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
@@ -104,7 +104,7 @@ PALETTE_INIT_MEMBER(btime_state,lnc)
bit2 = (color_prom[i] >> 0) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/buggychl.c b/src/mame/video/buggychl.c
index 67573245068..649d71a3a69 100644
--- a/src/mame/video/buggychl.c
+++ b/src/mame/video/buggychl.c
@@ -8,7 +8,7 @@ void buggychl_state::palette_init()
/* arbitrary blue shading for the sky, estimation */
for (i = 0; i < 128; i++)
- palette_set_color(machine(), i + 128, MAKE_RGB(0, 240-i, 255));
+ palette_set_color(machine(), i + 128, rgb_t(0, 240-i, 255));
}
void buggychl_state::video_start()
diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c
index e6b45ae6bf8..b6229427026 100644
--- a/src/mame/video/bwing.c
+++ b/src/mame/video/bwing.c
@@ -160,7 +160,7 @@ WRITE8_MEMBER(bwing_state::bwing_paletteram_w)
if (b > 0xff) b = 0xff;
}
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
#if BW_DEBUG
m_paletteram[offset + 0x40] = m_palatch;
diff --git a/src/mame/video/calomega.c b/src/mame/video/calomega.c
index 971a8eba9d1..f0cca1d8592 100644
--- a/src/mame/video/calomega.c
+++ b/src/mame/video/calomega.c
@@ -97,6 +97,6 @@ void calomega_state::palette_init()
b = bit2 * 0xff;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/capbowl.c b/src/mame/video/capbowl.c
index 6fe4f6759da..6fd0bd9c68b 100644
--- a/src/mame/video/capbowl.c
+++ b/src/mame/video/capbowl.c
@@ -117,7 +117,7 @@ READ8_MEMBER(capbowl_state::bowlrama_blitter_r)
inline rgb_t capbowl_state::pen_for_pixel( UINT8 *src, UINT8 pix )
{
- return MAKE_RGB(pal4bit(src[(pix << 1) + 0] >> 0),
+ return rgb_t(pal4bit(src[(pix << 1) + 0] >> 0),
pal4bit(src[(pix << 1) + 1] >> 4),
pal4bit(src[(pix << 1) + 1] >> 0));
}
diff --git a/src/mame/video/carjmbre.c b/src/mame/video/carjmbre.c
index d1295a6547f..fa4d9df2be7 100644
--- a/src/mame/video/carjmbre.c
+++ b/src/mame/video/carjmbre.c
@@ -64,7 +64,7 @@ WRITE8_MEMBER(carjmbre_state::carjmbre_bgcolor_w)
else
// restore to initial state (black)
for (i = 0; i < 64; i += 4)
- palette_set_color(machine(), i, RGB_BLACK);
+ palette_set_color(machine(), i, rgb_t::black);
}
}
diff --git a/src/mame/video/carpolo.c b/src/mame/video/carpolo.c
index c1a1563f4db..7805e37c67c 100644
--- a/src/mame/video/carpolo.c
+++ b/src/mame/video/carpolo.c
@@ -130,7 +130,7 @@ void carpolo_state::palette_init()
/* blue component */
b = ((b_voltage[(color_prom[pen] >> 0) & 0x03] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/cave.c b/src/mame/video/cave.c
index a047f275e9a..00ded219018 100644
--- a/src/mame/video/cave.c
+++ b/src/mame/video/cave.c
@@ -186,7 +186,7 @@ void cave_state::set_pens(int chip)
{
UINT16 data = m_paletteram[chip][m_palette_map[chip][pen]];
- rgb_t color = MAKE_RGB(pal5bit(data >> 5), pal5bit(data >> 10), pal5bit(data >> 0));
+ rgb_t color = rgb_t(pal5bit(data >> 5), pal5bit(data >> 10), pal5bit(data >> 0));
palette_set_color(machine(), pen, color);
}
diff --git a/src/mame/video/cbuster.c b/src/mame/video/cbuster.c
index fb09f3e52f2..ffcacfdeec3 100644
--- a/src/mame/video/cbuster.c
+++ b/src/mame/video/cbuster.c
@@ -19,7 +19,7 @@ void cbuster_state::update_24bitcol( int offset )
g = (UINT8)((float)((m_generic_paletteram_16[offset] >> 8) & 0xff) * 1.75);
b = (UINT8)((float)((m_generic_paletteram2_16[offset] >> 0) & 0xff) * 1.75);
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
WRITE16_MEMBER(cbuster_state::twocrude_palette_24bit_rg_w)
diff --git a/src/mame/video/ccastles.c b/src/mame/video/ccastles.c
index 473137e3a90..f21a611b5c9 100644
--- a/src/mame/video/ccastles.c
+++ b/src/mame/video/ccastles.c
@@ -103,7 +103,7 @@ WRITE8_MEMBER(ccastles_state::ccastles_paletteram_w)
bit2 = (~b >> 2) & 0x01;
b = combine_3_weights(m_bweights, bit0, bit1, bit2);
- palette_set_color(machine(), offset & 0x1f, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset & 0x1f, rgb_t(r, g, b));
}
diff --git a/src/mame/video/cclimber.c b/src/mame/video/cclimber.c
index 25da0b483c1..6270c3ccb1f 100644
--- a/src/mame/video/cclimber.c
+++ b/src/mame/video/cclimber.c
@@ -72,7 +72,7 @@ PALETTE_INIT_MEMBER(cclimber_state,cclimber)
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -141,7 +141,7 @@ PALETTE_INIT_MEMBER(cclimber_state,swimmer)
bit2 = (color_prom[i + 0x100] >> 3) & 0x01;
b = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
color_prom += 0x200;
@@ -170,15 +170,15 @@ PALETTE_INIT_MEMBER(cclimber_state,swimmer)
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
- palette_set_color(machine(), i + 0x100, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i + 0x100, rgb_t(r, g, b));
}
/* side panel backgrond pen */
#if 0
// values calculated from the resistors don't seem to match the real board
- palette_set_color(machine(), SWIMMER_SIDE_BG_PEN, MAKE_RGB(0x24, 0x5d, 0x4e));
+ palette_set_color(machine(), SWIMMER_SIDE_BG_PEN, rgb_t(0x24, 0x5d, 0x4e));
#endif
- palette_set_color(machine(), SWIMMER_SIDE_BG_PEN, MAKE_RGB(0x20, 0x98, 0x79));
+ palette_set_color(machine(), SWIMMER_SIDE_BG_PEN, rgb_t(0x20, 0x98, 0x79));
}
@@ -214,7 +214,7 @@ PALETTE_INIT_MEMBER(cclimber_state,yamato)
bit3 = (color_prom[i + 0x40] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
/* big sprite - 8 bits RGB */
@@ -241,12 +241,12 @@ PALETTE_INIT_MEMBER(cclimber_state,yamato)
bit2 = (color_prom[i + 0x80] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i + 0x40, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i + 0x40, rgb_t(r, g, b));
}
/* fake colors for bg gradient */
for (i = 0; i < 0x100; i++)
- palette_set_color(machine(), YAMATO_SKY_PEN_BASE + i, MAKE_RGB(0, 0, i));
+ palette_set_color(machine(), YAMATO_SKY_PEN_BASE + i, rgb_t(0, 0, i));
}
@@ -278,7 +278,7 @@ PALETTE_INIT_MEMBER(cclimber_state,toprollr)
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -323,7 +323,7 @@ void cclimber_state::swimmer_set_background_pen()
bit2 = (*m_swimmer_background_color >> 2) & 0x01;
b = 0x20 * bit0 + 0x40 * bit1 + 0x80 * bit2;
- palette_set_color(machine(), CCLIMBER_BG_PEN, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), CCLIMBER_BG_PEN, rgb_t(r, g, b));
}
diff --git a/src/mame/video/centiped.c b/src/mame/video/centiped.c
index fdf07ee1dff..e47def212e7 100644
--- a/src/mame/video/centiped.c
+++ b/src/mame/video/centiped.c
@@ -234,7 +234,7 @@ WRITE8_MEMBER(centiped_state::centiped_paletteram_w)
else if (g) g = 0xc0;
}
- color = MAKE_RGB(r, g, b);
+ color = rgb_t(r, g, b);
/* character colors, set directly */
if ((offset & 0x08) == 0)
@@ -306,7 +306,7 @@ PALETTE_INIT_MEMBER(centiped_state,warlords)
r = g = b = grey;
}
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
@@ -360,7 +360,7 @@ void centiped_state::milliped_set_color(offs_t offset, UINT8 data)
bit2 = (~data >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- color = MAKE_RGB(r, g, b);
+ color = rgb_t(r, g, b);
/* character colors, set directly */
if (offset < 0x10)
diff --git a/src/mame/video/chaknpop.c b/src/mame/video/chaknpop.c
index c7a424af535..80b04b96dcb 100644
--- a/src/mame/video/chaknpop.c
+++ b/src/mame/video/chaknpop.c
@@ -52,7 +52,7 @@ void chaknpop_state::palette_init()
bit2 = (col >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/champbas.c b/src/mame/video/champbas.c
index a600c08b4bd..78f568a912c 100644
--- a/src/mame/video/champbas.c
+++ b/src/mame/video/champbas.c
@@ -60,7 +60,7 @@ PALETTE_INIT_MEMBER(champbas_state,champbas)
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
color_prom += 0x20;
@@ -105,7 +105,7 @@ PALETTE_INIT_MEMBER(champbas_state,exctsccr)
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/cheekyms.c b/src/mame/video/cheekyms.c
index 738b6afaea6..853d11d2227 100644
--- a/src/mame/video/cheekyms.c
+++ b/src/mame/video/cheekyms.c
@@ -34,7 +34,7 @@ void cheekyms_state::palette_init()
bit = (color_prom[0x20 * (i / 2) + j] >> ((4 * (i & 1)) + 2)) & 0x01;
b = 0xff * bit;
- palette_set_color(machine(), (i * 0x20) + j, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), (i * 0x20) + j, rgb_t(r,g,b));
}
}
}
diff --git a/src/mame/video/cinemat.c b/src/mame/video/cinemat.c
index 084c8ad8dbc..adad41b6740 100644
--- a/src/mame/video/cinemat.c
+++ b/src/mame/video/cinemat.c
@@ -78,7 +78,7 @@ WRITE8_MEMBER(cinemat_state::cinemat_vector_control_w)
{
case COLOR_BILEVEL:
/* color is either bright or dim, selected by the value sent to the port */
- m_vector_color = (data & 1) ? MAKE_RGB(0x80,0x80,0x80) : MAKE_RGB(0xff,0xff,0xff);
+ m_vector_color = (data & 1) ? rgb_t(0x80,0x80,0x80) : rgb_t(0xff,0xff,0xff);
break;
case COLOR_16LEVEL:
@@ -88,7 +88,7 @@ WRITE8_MEMBER(cinemat_state::cinemat_vector_control_w)
{
int xval = cpu->state_int(CCPU_X) & 0x0f;
i = (xval + 1) * 255 / 16;
- m_vector_color = MAKE_RGB(i,i,i);
+ m_vector_color = rgb_t(i,i,i);
}
break;
@@ -100,7 +100,7 @@ WRITE8_MEMBER(cinemat_state::cinemat_vector_control_w)
int xval = cpu->state_int(CCPU_X);
xval = (~xval >> 2) & 0x3f;
i = (xval + 1) * 255 / 64;
- m_vector_color = MAKE_RGB(i,i,i);
+ m_vector_color = rgb_t(i,i,i);
}
break;
@@ -116,7 +116,7 @@ WRITE8_MEMBER(cinemat_state::cinemat_vector_control_w)
g = g * 255 / 15;
b = (~xval >> 8) & 0x0f;
b = b * 255 / 15;
- m_vector_color = MAKE_RGB(r,g,b);
+ m_vector_color = rgb_t(r,g,b);
}
break;
@@ -143,7 +143,7 @@ WRITE8_MEMBER(cinemat_state::cinemat_vector_control_w)
g = g * 255 / 7;
b = (~yval >> 6) & 0x03;
b = b * 255 / 3;
- m_vector_color = MAKE_RGB(r,g,b);
+ m_vector_color = rgb_t(r,g,b);
/* restore the original X,Y values */
cpu->set_state_int(CCPU_X, m_qb3_lastx);
diff --git a/src/mame/video/circusc.c b/src/mame/video/circusc.c
index afe4776b674..f236b1141f7 100644
--- a/src/mame/video/circusc.c
+++ b/src/mame/video/circusc.c
@@ -70,7 +70,7 @@ void circusc_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/cloak.c b/src/mame/video/cloak.c
index 0d215b19d97..4c7f78840eb 100644
--- a/src/mame/video/cloak.c
+++ b/src/mame/video/cloak.c
@@ -80,7 +80,7 @@ void cloak_state::set_pens()
bit2 = (~palette_ram[i] >> 2) & 0x01;
b = combine_3_weights(weights, bit0, bit1, bit2);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/cloud9.c b/src/mame/video/cloud9.c
index 315f6946c0a..4209d0c5153 100644
--- a/src/mame/video/cloud9.c
+++ b/src/mame/video/cloud9.c
@@ -93,7 +93,7 @@ WRITE8_MEMBER(cloud9_state::cloud9_paletteram_w)
bit2 = (~b >> 2) & 0x01;
b = combine_3_weights(m_bweights, bit0, bit1, bit2);
- palette_set_color(machine(), offset & 0x3f, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset & 0x3f, rgb_t(r, g, b));
}
diff --git a/src/mame/video/clshroad.c b/src/mame/video/clshroad.c
index 885aa5f6db2..f019946ae4d 100644
--- a/src/mame/video/clshroad.c
+++ b/src/mame/video/clshroad.c
@@ -65,7 +65,7 @@ PALETTE_INIT_MEMBER(clshroad_state,firebatl)
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/combatsc.c b/src/mame/video/combatsc.c
index 898cf55afac..0a3e5e4de6c 100644
--- a/src/mame/video/combatsc.c
+++ b/src/mame/video/combatsc.c
@@ -98,7 +98,7 @@ void combatsc_state::set_pens( )
{
UINT16 data = m_paletteram[i] | (m_paletteram[i | 1] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
diff --git a/src/mame/video/compgolf.c b/src/mame/video/compgolf.c
index 3d472291d0b..e6e9f886172 100644
--- a/src/mame/video/compgolf.c
+++ b/src/mame/video/compgolf.c
@@ -30,7 +30,7 @@ void compgolf_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/contra.c b/src/mame/video/contra.c
index 8db53749e1e..6404f155a12 100644
--- a/src/mame/video/contra.c
+++ b/src/mame/video/contra.c
@@ -60,7 +60,7 @@ void contra_state::set_pens( )
{
UINT16 data = m_paletteram[i] | (m_paletteram[i | 1] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
diff --git a/src/mame/video/cop01.c b/src/mame/video/cop01.c
index ba8c494a3d6..ccde97cde43 100644
--- a/src/mame/video/cop01.c
+++ b/src/mame/video/cop01.c
@@ -25,7 +25,7 @@ void cop01_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/cosmic.c b/src/mame/video/cosmic.c
index 52335002c23..f51cfec1fda 100644
--- a/src/mame/video/cosmic.c
+++ b/src/mame/video/cosmic.c
@@ -90,7 +90,7 @@ PALETTE_INIT_MEMBER(cosmic_state,panic)
int g = pal1bit(i >> 1);
int b = ((i & 0x0c) == 0x08) ? 0xaa : pal1bit(i >> 2);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* background uses colors 0x00-0x0f */
@@ -128,7 +128,7 @@ PALETTE_INIT_MEMBER(cosmic_state,cosmica)
/* create a lookup table for the palette */
for (i = 0; i < 0x08; i++)
{
- rgb_t color = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ rgb_t color = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
colortable_palette_set_color(machine().colortable, i, color);
}
@@ -170,7 +170,7 @@ PALETTE_INIT_MEMBER(cosmic_state,cosmicg)
int g = 0xaa * ((i >> 1) & 1);
int b = 0xaa * ((i >> 2) & 1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
m_map_color = cosmicg_map_color;
@@ -192,7 +192,7 @@ PALETTE_INIT_MEMBER(cosmic_state,magspot)
int g = pal1bit(i >> 1);
int b = pal1bit(i >> 2);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* background uses colors 0x00-0x0f */
@@ -222,7 +222,7 @@ PALETTE_INIT_MEMBER(cosmic_state,nomnlnd)
/* create a lookup table for the palette */
for (i = 0; i < 0x10; i++)
{
- rgb_t color = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ rgb_t color = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
colortable_palette_set_color(machine().colortable, i, color);
}
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c
index 642bc5f0716..7bbc07c19d3 100644
--- a/src/mame/video/cps1.c
+++ b/src/mame/video/cps1.c
@@ -2113,7 +2113,7 @@ VIDEO_START_MEMBER(cps_state,cps)
cps1_update_transmasks();
for (i = 0; i < cps1_palette_entries * 16; i++)
- palette_set_color(machine(), i, MAKE_RGB(0,0,0));
+ palette_set_color(machine(), i, rgb_t(0,0,0));
m_buffered_obj = auto_alloc_array_clear(machine(), UINT16, m_obj_size / 2);
@@ -2232,7 +2232,7 @@ void cps_state::cps1_build_palette( const UINT16* const palette_base )
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
- palette_set_color (machine(), 0x200 * page + offset, MAKE_RGB(r, g, b));
+ palette_set_color (machine(), 0x200 * page + offset, rgb_t(r, g, b));
}
}
else
diff --git a/src/mame/video/crbaloon.c b/src/mame/video/crbaloon.c
index 804adf21ca1..eb6702829cb 100644
--- a/src/mame/video/crbaloon.c
+++ b/src/mame/video/crbaloon.c
@@ -42,7 +42,7 @@ void crbaloon_state::palette_init()
g = h * ((~pen >> 1) & 1);
b = h * ((~pen >> 2) & 1);
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/crgolf.c b/src/mame/video/crgolf.c
index 3ce946e9091..16127f2acaf 100644
--- a/src/mame/video/crgolf.c
+++ b/src/mame/video/crgolf.c
@@ -75,7 +75,7 @@ void crgolf_state::get_pens( pen_t *pens )
bit1 = (data >> 7) & 0x01;
b = 0x4f * bit0 + 0xa8 * bit1;
- pens[offs] = MAKE_RGB(r, g, b);
+ pens[offs] = rgb_t(r, g, b);
}
}
diff --git a/src/mame/video/cvs.c b/src/mame/video/cvs.c
index 3c629ce1027..4607030a884 100644
--- a/src/mame/video/cvs.c
+++ b/src/mame/video/cvs.c
@@ -74,7 +74,7 @@ void cvs_state::set_pens( )
int g = pal3bit(~m_palette_ram[i] >> 2);
int b = pal3bit(~m_palette_ram[i] >> 5);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/darkmist.c b/src/mame/video/darkmist.c
index c33137730c3..532c740c4d9 100644
--- a/src/mame/video/darkmist.c
+++ b/src/mame/video/darkmist.c
@@ -110,10 +110,10 @@ void darkmist_state::set_pens()
int g = pal4bit(m_generic_paletteram_8[i | 0x000] >> 4);
int b = pal4bit(m_generic_paletteram_8[i | 0x000] >> 0);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
- colortable_palette_set_color(machine().colortable, 0x100, RGB_BLACK);
+ colortable_palette_set_color(machine().colortable, 0x100, rgb_t::black);
}
diff --git a/src/mame/video/darkseal.c b/src/mame/video/darkseal.c
index 0e38186c8d7..f8250c0a898 100644
--- a/src/mame/video/darkseal.c
+++ b/src/mame/video/darkseal.c
@@ -33,7 +33,7 @@ void darkseal_state::update_24bitcol(int offset)
g = (m_generic_paletteram_16[offset] >> 8) & 0xff;
b = (m_generic_paletteram2_16[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
WRITE16_MEMBER(darkseal_state::darkseal_palette_24bit_rg_w)
diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c
index a8d9acbf10e..8d6b011e903 100644
--- a/src/mame/video/dday.c
+++ b/src/mame/video/dday.c
@@ -62,7 +62,7 @@ void dday_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
for (i = 0; i < 0x100; i++)
diff --git a/src/mame/video/ddribble.c b/src/mame/video/ddribble.c
index 746f2241104..fbeeb2263c8 100644
--- a/src/mame/video/ddribble.c
+++ b/src/mame/video/ddribble.c
@@ -38,7 +38,7 @@ void ddribble_state::set_pens( )
{
UINT16 data = m_paletteram[i | 1] | (m_paletteram[i] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
}
diff --git a/src/mame/video/dec0.c b/src/mame/video/dec0.c
index 374a9b76cab..e721e9a5347 100644
--- a/src/mame/video/dec0.c
+++ b/src/mame/video/dec0.c
@@ -25,7 +25,7 @@ void dec0_state::update_24bitcol(int offset)
g = (m_generic_paletteram_16[offset] >> 8) & 0xff;
b = (m_generic_paletteram2_16[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
WRITE16_MEMBER(dec0_state::dec0_paletteram_rg_w)
diff --git a/src/mame/video/dec8.c b/src/mame/video/dec8.c
index 42dea6e230b..381b5e1745b 100644
--- a/src/mame/video/dec8.c
+++ b/src/mame/video/dec8.c
@@ -97,7 +97,7 @@ PALETTE_INIT_MEMBER(dec8_state,ghostb)
bit3 = (color_prom[i + machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/deco32.c b/src/mame/video/deco32.c
index 0f670267679..74ef209563d 100644
--- a/src/mame/video/deco32.c
+++ b/src/mame/video/deco32.c
@@ -87,7 +87,7 @@ void deco32_state::updateAceRam()
r = (UINT8)((float)r + (((float)fadeptr - (float)r) * (float)fadepsr/255.0f));
}
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
@@ -106,7 +106,7 @@ WRITE32_MEMBER(deco32_state::deco32_nonbuffered_palette_w)
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
r = (m_generic_paletteram_32[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
WRITE32_MEMBER(deco32_state::deco32_buffered_palette_w)
@@ -134,7 +134,7 @@ WRITE32_MEMBER(deco32_state::deco32_palette_dma_w)
g = (m_generic_paletteram_32[i] >> 8) & 0xff;
r = (m_generic_paletteram_32[i] >> 0) & 0xff;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
}
diff --git a/src/mame/video/decocass.c b/src/mame/video/decocass.c
index 7ee81ef292b..52b98b2448e 100644
--- a/src/mame/video/decocass.c
+++ b/src/mame/video/decocass.c
@@ -294,7 +294,7 @@ WRITE8_MEMBER(decocass_state::decocass_paletteram_w )
m_paletteram[offset] = data;
offset = (offset & 31) ^ 16;
- colortable_palette_set_color(machine().colortable, offset, MAKE_RGB(pal3bit(~data >> 0), pal3bit(~data >> 3), pal2bit(~data >> 6)));
+ colortable_palette_set_color(machine().colortable, offset, rgb_t(pal3bit(~data >> 0), pal3bit(~data >> 3), pal2bit(~data >> 6)));
}
WRITE8_MEMBER(decocass_state::decocass_charram_w )
diff --git a/src/mame/video/decocomn.c b/src/mame/video/decocomn.c
index a5efd0d908c..d71f17adc17 100644
--- a/src/mame/video/decocomn.c
+++ b/src/mame/video/decocomn.c
@@ -74,7 +74,7 @@ WRITE16_MEMBER( decocomn_device::nonbuffered_palette_w )
g = (state->m_generic_paletteram_16[offset + 1] >> 8) & 0xff;
r = (state->m_generic_paletteram_16[offset + 1] >> 0) & 0xff;
- palette_set_color(space.machine(), offset / 2, MAKE_RGB(r,g,b));
+ palette_set_color(space.machine(), offset / 2, rgb_t(r,g,b));
}
WRITE16_MEMBER( decocomn_device::buffered_palette_w )
@@ -103,7 +103,7 @@ WRITE16_MEMBER( decocomn_device::palette_dma_w )
g = (state->m_generic_paletteram_16[i * 2 + 1] >> 8) & 0xff;
r = (state->m_generic_paletteram_16[i * 2 + 1] >> 0) & 0xff;
- palette_set_color(space.machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(space.machine(), i, rgb_t(r,g,b));
}
}
}
diff --git a/src/mame/video/decodmd1.c b/src/mame/video/decodmd1.c
index e19e9eec0ef..8ceaf478b1b 100644
--- a/src/mame/video/decodmd1.c
+++ b/src/mame/video/decodmd1.c
@@ -291,18 +291,18 @@ UINT32 decodmd_type1_device::screen_update( screen_device &screen, bitmap_rgb32
for(dot=0;dot<64;dot+=2)
{
if((data1 & 0x01) != (data3 & 0x01))
- col = MAKE_RGB(0x7f,0x55,0x00);
+ col = rgb_t(0x7f,0x55,0x00);
else if (data1 & 0x01) // both are the same, so either high intensity or none at all
- col = MAKE_RGB(0xff,0xaa,0x00);
+ col = rgb_t(0xff,0xaa,0x00);
else
- col = RGB_BLACK;
+ col = rgb_t::black;
bitmap.pix32(y,x+dot) = col;
if((data2 & 0x01) != (data4 & 0x01))
- col = MAKE_RGB(0x7f,0x55,0x00);
+ col = rgb_t(0x7f,0x55,0x00);
else if (data2 & 0x01) // both are the same, so either high intensity or none at all
- col = MAKE_RGB(0xff,0xaa,0x00);
+ col = rgb_t(0xff,0xaa,0x00);
else
- col = RGB_BLACK;
+ col = rgb_t::black;
bitmap.pix32(y,x+dot+1) = col;
data1 >>= 1;
data2 >>= 1;
diff --git a/src/mame/video/decodmd2.c b/src/mame/video/decodmd2.c
index 03611361fb2..ca2ba7a20de 100644
--- a/src/mame/video/decodmd2.c
+++ b/src/mame/video/decodmd2.c
@@ -109,7 +109,7 @@ MC6845_UPDATE_ROW( dmd_update_row )
for(dot=0;dot<8;dot++)
{
intensity = ((RAM[addr] >> (7-dot) & 0x01) << 1) | (RAM[addr+0x200] >> (7-dot) & 0x01);
- bitmap.pix32(y,x+dot) = MAKE_RGB(0x3f*intensity,0x2a*intensity,0x00);
+ bitmap.pix32(y,x+dot) = rgb_t(0x3f*intensity,0x2a*intensity,0x00);
}
addr++;
}
diff --git a/src/mame/video/decodmd3.c b/src/mame/video/decodmd3.c
index 5632b08382f..e02ad9f4939 100644
--- a/src/mame/video/decodmd3.c
+++ b/src/mame/video/decodmd3.c
@@ -108,12 +108,12 @@ MC6845_UPDATE_ROW( dmd64_update_row )
for(dot=0;dot<8;dot++)
{
intensity = ((RAM[addr+1] >> (7-dot) & 0x01) << 1) | (RAM[addr+0x801] >> (7-dot) & 0x01);
- bitmap.pix32(y,x+dot) = MAKE_RGB(0x3f*intensity,0x2a*intensity,0x00);
+ bitmap.pix32(y,x+dot) = rgb_t(0x3f*intensity,0x2a*intensity,0x00);
}
for(dot=8;dot<16;dot++)
{
intensity = ((RAM[addr] >> (15-dot) & 0x01) << 1) | (RAM[addr+0x800] >> (15-dot) & 0x01);
- bitmap.pix32(y,x+dot) = MAKE_RGB(0x3f*intensity,0x2a*intensity,0x00);
+ bitmap.pix32(y,x+dot) = rgb_t(0x3f*intensity,0x2a*intensity,0x00);
}
addr+=2;
}
diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c
index f7e9e364226..8725906c036 100644
--- a/src/mame/video/digdug.c
+++ b/src/mame/video/digdug.c
@@ -44,7 +44,7 @@ PALETTE_INIT_MEMBER(digdug_state,digdug)
bit1 = (*color_prom >> 6) & 0x01;
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable,i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,i,rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/video/docastle.c b/src/mame/video/docastle.c
index c85aca7a61b..c75f6b08562 100644
--- a/src/mame/video/docastle.c
+++ b/src/mame/video/docastle.c
@@ -55,8 +55,8 @@ void docastle_state::palette_init()
/* because the graphics are decoded as 4bpp with the top bit used for transparency
or priority, we create matching 3bpp sets of palette entries, which effectively
ignores the value of the top bit */
- palette_set_color(machine(), ((i & 0xf8) << 1) | 0x00 | (i & 0x07), MAKE_RGB(r,g,b));
- palette_set_color(machine(), ((i & 0xf8) << 1) | 0x08 | (i & 0x07), MAKE_RGB(r,g,b));
+ palette_set_color(machine(), ((i & 0xf8) << 1) | 0x00 | (i & 0x07), rgb_t(r,g,b));
+ palette_set_color(machine(), ((i & 0xf8) << 1) | 0x08 | (i & 0x07), rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/video/dogfgt.c b/src/mame/video/dogfgt.c
index 29b66b6794e..f64e663d752 100644
--- a/src/mame/video/dogfgt.c
+++ b/src/mame/video/dogfgt.c
@@ -37,7 +37,7 @@ void dogfgt_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i + 16, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i + 16, rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/video/dribling.c b/src/mame/video/dribling.c
index c44a791f5c6..96fa0866dda 100644
--- a/src/mame/video/dribling.c
+++ b/src/mame/video/dribling.c
@@ -32,7 +32,7 @@ void dribling_state::palette_init()
g *= 0x55;
b *= 0xff;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/drmicro.c b/src/mame/video/drmicro.c
index 0003d043028..cafa102aae7 100644
--- a/src/mame/video/drmicro.c
+++ b/src/mame/video/drmicro.c
@@ -88,7 +88,7 @@ void drmicro_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/epos.c b/src/mame/video/epos.c
index 94800f5f606..f4fbced856b 100644
--- a/src/mame/video/epos.c
+++ b/src/mame/video/epos.c
@@ -48,7 +48,7 @@ void epos_state::get_pens( pen_t *pens )
bit1 = (data >> 0) & 0x01;
b = 0xad * bit0 + 0x52 * bit1;
- pens[i] = MAKE_RGB(r, g, b);
+ pens[i] = rgb_t(r, g, b);
}
}
diff --git a/src/mame/video/equites.c b/src/mame/video/equites.c
index b7d36e8b3ea..9648afa3bc2 100644
--- a/src/mame/video/equites.c
+++ b/src/mame/video/equites.c
@@ -16,7 +16,7 @@ PALETTE_INIT_MEMBER(equites_state,equites)
machine().colortable = colortable_alloc(machine(), 256);
for (i = 0; i < 256; i++)
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(pal4bit(color_prom[i]), pal4bit(color_prom[i + 0x100]), pal4bit(color_prom[i + 0x200])));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(pal4bit(color_prom[i]), pal4bit(color_prom[i + 0x100]), pal4bit(color_prom[i + 0x200])));
// point to the CLUT
color_prom += 0x380;
@@ -36,7 +36,7 @@ PALETTE_INIT_MEMBER(equites_state,splndrbt)
machine().colortable = colortable_alloc(machine(), 256);
for (i = 0; i < 0x100; i++)
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(pal4bit(color_prom[i]), pal4bit(color_prom[i + 0x100]), pal4bit(color_prom[i + 0x200])));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(pal4bit(color_prom[i]), pal4bit(color_prom[i + 0x100]), pal4bit(color_prom[i + 0x200])));
for (i = 0; i < 0x100; i++)
colortable_entry_set_value(machine().colortable, i, i);
diff --git a/src/mame/video/espial.c b/src/mame/video/espial.c
index 953f37be602..de975755ebd 100644
--- a/src/mame/video/espial.c
+++ b/src/mame/video/espial.c
@@ -54,7 +54,7 @@ void espial_state::palette_init()
bit2 = (color_prom[i + machine().total_colors()] >> 3) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/esripsys.c b/src/mame/video/esripsys.c
index babf9f1d661..da45192d912 100644
--- a/src/mame/video/esripsys.c
+++ b/src/mame/video/esripsys.c
@@ -168,7 +168,7 @@ UINT32 esripsys_state::screen_update_esripsys(screen_device &screen, bitmap_rgb3
int b = (m_pal_ram[512 + idx] & 0xf);
int i = intensity_buf[x];
- *dest++ = MAKE_RGB(r*i, g*i, b*i);
+ *dest++ = rgb_t(r*i, g*i, b*i);
/* Clear the line buffer as we scan out */
colour_buf[x] = 0xff;
diff --git a/src/mame/video/exedexes.c b/src/mame/video/exedexes.c
index 6e0632cadc2..1ab9d2a5012 100644
--- a/src/mame/video/exedexes.c
+++ b/src/mame/video/exedexes.c
@@ -46,7 +46,7 @@ void exedexes_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/exerion.c b/src/mame/video/exerion.c
index eb7fa83a50e..21dec79b2a4 100644
--- a/src/mame/video/exerion.c
+++ b/src/mame/video/exerion.c
@@ -76,7 +76,7 @@ void exerion_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/fastfred.c b/src/mame/video/fastfred.c
index 78a4bc61505..f0e5ef30e35 100644
--- a/src/mame/video/fastfred.c
+++ b/src/mame/video/fastfred.c
@@ -66,7 +66,7 @@ PALETTE_INIT_MEMBER(fastfred_state,fastfred)
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = combine_4_weights(bweights, bit0, bit1, bit2, bit3);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* characters and sprites use the same palette */
@@ -346,8 +346,8 @@ VIDEO_START_MEMBER(fastfred_state,imago)
m_stars_on = 1;
/* web colors */
- palette_set_color(machine(),256+64+0,MAKE_RGB(0x50,0x00,0x00));
- palette_set_color(machine(),256+64+1,MAKE_RGB(0x00,0x00,0x00));
+ palette_set_color(machine(),256+64+0,rgb_t(0x50,0x00,0x00));
+ palette_set_color(machine(),256+64+1,rgb_t(0x00,0x00,0x00));
}
UINT32 fastfred_state::screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mame/video/fastlane.c b/src/mame/video/fastlane.c
index bde6ff6aaf9..0b2a185ddcb 100644
--- a/src/mame/video/fastlane.c
+++ b/src/mame/video/fastlane.c
@@ -31,7 +31,7 @@ void fastlane_state::set_pens( )
{
UINT16 data = m_paletteram[i | 1] | (m_paletteram[i] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
diff --git a/src/mame/video/fcombat.c b/src/mame/video/fcombat.c
index fc2b73f99dd..edac891e4ae 100644
--- a/src/mame/video/fcombat.c
+++ b/src/mame/video/fcombat.c
@@ -69,7 +69,7 @@ void fcombat_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/finalizr.c b/src/mame/video/finalizr.c
index 14afd6ca1d6..511b163b69e 100644
--- a/src/mame/video/finalizr.c
+++ b/src/mame/video/finalizr.c
@@ -25,7 +25,7 @@ void finalizr_state::palette_init()
int g = pal4bit(color_prom[i + 0x00] >> 4);
int b = pal4bit(color_prom[i + 0x20] >> 0);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/firetrap.c b/src/mame/video/firetrap.c
index 749c1c50e32..bfabf82a414 100644
--- a/src/mame/video/firetrap.c
+++ b/src/mame/video/firetrap.c
@@ -61,7 +61,7 @@ void firetrap_state::palette_init()
bit3 = (color_prom[i + machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/firetrk.c b/src/mame/video/firetrk.c
index 0fde5e27d89..e72fa468632 100644
--- a/src/mame/video/firetrk.c
+++ b/src/mame/video/firetrk.c
@@ -26,10 +26,10 @@ void firetrk_state::palette_init()
};
static const rgb_t palette_source[] =
{
- RGB_BLACK,
- MAKE_RGB(0x5b, 0x5b, 0x5b),
- MAKE_RGB(0xa4, 0xa4, 0xa4),
- RGB_WHITE
+ rgb_t::black,
+ rgb_t(0x5b, 0x5b, 0x5b),
+ rgb_t(0xa4, 0xa4, 0xa4),
+ rgb_t::white
};
m_color1_mask = m_color2_mask = 0;
@@ -50,7 +50,7 @@ void firetrk_state::palette_init()
void firetrk_state::prom_to_palette(int number, UINT8 val)
{
- palette_set_color(machine(), number, MAKE_RGB(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));
+ palette_set_color(machine(), number, rgb_t(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));
}
@@ -106,8 +106,8 @@ PALETTE_INIT_MEMBER(firetrk_state,montecar)
prom_to_palette(i, color_prom[0x100 + colortable_source[i]]);
}
- palette_set_color(machine(), ARRAY_LENGTH(colortable_source) + 0, RGB_BLACK);
- palette_set_color(machine(), ARRAY_LENGTH(colortable_source) + 1, RGB_WHITE);
+ palette_set_color(machine(), ARRAY_LENGTH(colortable_source) + 0, rgb_t::black);
+ palette_set_color(machine(), ARRAY_LENGTH(colortable_source) + 1, rgb_t::white);
}
diff --git a/src/mame/video/flower.c b/src/mame/video/flower.c
index 0c75b59a5fd..1f673f6d3a3 100644
--- a/src/mame/video/flower.c
+++ b/src/mame/video/flower.c
@@ -19,7 +19,7 @@ void flower_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
for (i = 0; i < 0x100; i++)
diff --git a/src/mame/video/foodf.c b/src/mame/video/foodf.c
index b05912565c1..e9c1992e961 100644
--- a/src/mame/video/foodf.c
+++ b/src/mame/video/foodf.c
@@ -98,7 +98,7 @@ WRITE16_MEMBER(foodf_state::foodf_paletteram_w)
bit1 = (newword >> 7) & 0x01;
b = combine_2_weights(m_bweights, bit0, bit1);
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
diff --git a/src/mame/video/funkybee.c b/src/mame/video/funkybee.c
index 2031a152c97..92e1bfa3c07 100644
--- a/src/mame/video/funkybee.c
+++ b/src/mame/video/funkybee.c
@@ -35,7 +35,7 @@ void funkybee_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
color_prom++;
}
}
diff --git a/src/mame/video/funworld.c b/src/mame/video/funworld.c
index 12964e89926..e54b6e86452 100644
--- a/src/mame/video/funworld.c
+++ b/src/mame/video/funworld.c
@@ -81,7 +81,7 @@ PALETTE_INIT_MEMBER(funworld_state,funworld)
bit1 = (color_prom[i] >> 7) & 0x01;
g = combine_2_weights(weights_g, bit0, bit1);
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/fuukifg2.c b/src/mame/video/fuukifg2.c
index 305f9e4011e..3293d916d95 100644
--- a/src/mame/video/fuukifg2.c
+++ b/src/mame/video/fuukifg2.c
@@ -86,7 +86,7 @@ PALETTE_INIT_MEMBER(fuuki16_state,fuuki16)
/* The game does not initialise the palette at startup. It should
be totally black */
for (pen = 0; pen < machine().total_colors(); pen++)
- palette_set_color(machine(),pen,MAKE_RGB(0,0,0));
+ palette_set_color(machine(),pen,rgb_t(0,0,0));
}
#endif
diff --git a/src/mame/video/gaelco2.c b/src/mame/video/gaelco2.c
index 103dcaa7c5a..0ff0810e290 100644
--- a/src/mame/video/gaelco2.c
+++ b/src/mame/video/gaelco2.c
@@ -234,7 +234,7 @@ WRITE16_MEMBER(gaelco2_state::gaelco2_palette_w)
b = pal5bit(b);
/* update game palette */
- palette_set_color(machine(), 4096*0 + offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), 4096*0 + offset, rgb_t(r, g, b));
/* update shadow/highligh palettes */
for (i = 1; i < 16; i++){
@@ -246,7 +246,7 @@ WRITE16_MEMBER(gaelco2_state::gaelco2_palette_w)
auxg = ADJUST_COLOR(g + pen_color_adjust[i]);
auxb = ADJUST_COLOR(b + pen_color_adjust[i]);
- palette_set_color(machine(), 4096*i + offset, MAKE_RGB(auxr, auxg, auxb));
+ palette_set_color(machine(), 4096*i + offset, rgb_t(auxr, auxg, auxb));
}
}
diff --git a/src/mame/video/galaga.c b/src/mame/video/galaga.c
index 6eb98fe3213..ad733e52e0a 100644
--- a/src/mame/video/galaga.c
+++ b/src/mame/video/galaga.c
@@ -348,7 +348,7 @@ PALETTE_INIT_MEMBER(galaga_state,galaga)
bit2 = ((*color_prom) >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable,i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,i,rgb_t(r,g,b));
color_prom++;
}
@@ -365,7 +365,7 @@ PALETTE_INIT_MEMBER(galaga_state,galaga)
bits = (i >> 4) & 0x03;
b = map[bits];
- colortable_palette_set_color(machine().colortable,32 + i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,32 + i,rgb_t(r,g,b));
}
/* characters */
diff --git a/src/mame/video/galaxian.c b/src/mame/video/galaxian.c
index 179279a9c67..8f184a7f10e 100644
--- a/src/mame/video/galaxian.c
+++ b/src/mame/video/galaxian.c
@@ -301,7 +301,7 @@ void galaxian_state::palette_init()
bit1 = BIT(color_prom[i],7);
b = combine_2_weights(bweights, bit0, bit1);
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
/*
@@ -350,13 +350,13 @@ void galaxian_state::palette_init()
b = starmap[(bit1 << 1) | bit0];
/* set the RGB color */
- m_star_color[i] = MAKE_RGB(r, g, b);
+ m_star_color[i] = rgb_t(r, g, b);
}
/* default bullet colors are white for the first 7, and yellow for the last one */
for (i = 0; i < 7; i++)
- m_bullet_color[i] = MAKE_RGB(0xff,0xff,0xff);
- m_bullet_color[7] = MAKE_RGB(0xff,0xff,0x00);
+ m_bullet_color[i] = rgb_t(0xff,0xff,0xff);
+ m_bullet_color[7] = rgb_t(0xff,0xff,0x00);
}
PALETTE_INIT_MEMBER(galaxian_state,moonwar)
@@ -364,7 +364,7 @@ PALETTE_INIT_MEMBER(galaxian_state,moonwar)
galaxian_state::palette_init();
/* wire mod to connect the bullet blue output to the 220 ohm resistor */
- m_bullet_color[7] = MAKE_RGB(0xef,0xef,0x97);
+ m_bullet_color[7] = rgb_t(0xef,0xef,0x97);
}
/*************************************
@@ -899,7 +899,7 @@ void galaxian_state::stars_draw_row(bitmap_rgb32 &bitmap, int maxx, int y, UINT3
void galaxian_state::galaxian_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/* erase the background to black first */
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::black, cliprect);
/* update the star origin to the current frame */
stars_update_origin();
@@ -927,7 +927,7 @@ void galaxian_state::background_draw_colorsplit(bitmap_rgb32 &bitmap, const rect
rectangle draw = cliprect;
draw.max_x = MIN(draw.max_x, split_flipped * GALAXIAN_XSCALE - 1);
if (draw.min_x <= draw.max_x)
- bitmap.fill(RGB_BLACK, draw);
+ bitmap.fill(rgb_t::black, draw);
draw = cliprect;
draw.min_x = MAX(draw.min_x, split_flipped * GALAXIAN_XSCALE);
@@ -944,7 +944,7 @@ void galaxian_state::background_draw_colorsplit(bitmap_rgb32 &bitmap, const rect
draw = cliprect;
draw.min_x = MAX(draw.min_x, split * GALAXIAN_XSCALE);
if (draw.min_x <= draw.max_x)
- bitmap.fill(RGB_BLACK, draw);
+ bitmap.fill(rgb_t::black, draw);
}
}
@@ -978,7 +978,7 @@ void galaxian_state::scramble_draw_stars(bitmap_rgb32 &bitmap, const rectangle &
void galaxian_state::scramble_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/* blue background - 390 ohm resistor */
- bitmap.fill(m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, cliprect);
+ bitmap.fill(m_background_enable ? rgb_t(0,0,0x56) : rgb_t::black, cliprect);
scramble_draw_stars(bitmap, cliprect, 256);
}
@@ -987,7 +987,7 @@ void galaxian_state::scramble_draw_background(bitmap_rgb32 &bitmap, const rectan
void galaxian_state::anteater_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/* blue background, horizontal split as seen on flyer and real cabinet */
- background_draw_colorsplit(bitmap, cliprect, m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, 56, 256-56);
+ background_draw_colorsplit(bitmap, cliprect, m_background_enable ? rgb_t(0,0,0x56) : rgb_t::black, 56, 256-56);
scramble_draw_stars(bitmap, cliprect, 256);
}
@@ -996,7 +996,7 @@ void galaxian_state::anteater_draw_background(bitmap_rgb32 &bitmap, const rectan
void galaxian_state::jumpbug_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/* blue background - 390 ohm resistor */
- bitmap.fill(m_background_enable ? MAKE_RGB(0,0,0x56) : RGB_BLACK, cliprect);
+ bitmap.fill(m_background_enable ? rgb_t(0,0,0x56) : rgb_t::black, cliprect);
/* render stars same as scramble but nothing in the status area */
scramble_draw_stars(bitmap, cliprect, 240);
@@ -1012,7 +1012,7 @@ void galaxian_state::turtles_draw_background(bitmap_rgb32 &bitmap, const rectang
GREEN - 470 ohm resistor
BLUE - 390 ohm resistor
*/
- bitmap.fill(MAKE_RGB(m_background_red * 0x55, m_background_green * 0x47, m_background_blue * 0x55), cliprect);
+ bitmap.fill(rgb_t(m_background_red * 0x55, m_background_green * 0x47, m_background_blue * 0x55), cliprect);
}
@@ -1020,7 +1020,7 @@ void galaxian_state::frogger_draw_background(bitmap_rgb32 &bitmap, const rectang
{
/* color split point verified on real machine */
/* hmmm, according to schematics it is at 128+8; which is right? */
- background_draw_colorsplit(bitmap, cliprect, MAKE_RGB(0,0,0x47), 128+8, 128-8);
+ background_draw_colorsplit(bitmap, cliprect, rgb_t(0,0,0x47), 128+8, 128-8);
}
@@ -1068,7 +1068,7 @@ void galaxian_state::amidar_draw_background(bitmap_rgb32 &bitmap, const rectangl
UINT8 red = ((~prom[x] & 0x02) && m_background_red) ? 0x7c : 0x00;
UINT8 green = ((~prom[x] & 0x02) && m_background_green) ? 0x3c : 0x00;
UINT8 blue = ((~prom[x] & 0x01) && m_background_blue) ? 0x47 : 0x00;
- bitmap.fill(MAKE_RGB(red, green, blue, draw));
+ bitmap.fill(rgb_t(red, green, blue, draw));
}
}
#endif
@@ -1126,23 +1126,23 @@ void galaxian_state::mshuttle_draw_bullet(bitmap_rgb32 &bitmap, const rectangle
*/
static const rgb_t colors[8] =
{
- MAKE_RGB(0xff,0xff,0xff),
- MAKE_RGB(0xff,0xff,0x00),
- MAKE_RGB(0x00,0xff,0xff),
- MAKE_RGB(0x00,0xff,0x00),
- MAKE_RGB(0xff,0x00,0xff),
- MAKE_RGB(0xff,0x00,0x00),
- MAKE_RGB(0x00,0x00,0xff),
- MAKE_RGB(0x00,0x00,0x00)
+ rgb_t(0xff,0xff,0xff),
+ rgb_t(0xff,0xff,0x00),
+ rgb_t(0x00,0xff,0xff),
+ rgb_t(0x00,0xff,0x00),
+ rgb_t(0xff,0x00,0xff),
+ rgb_t(0xff,0x00,0x00),
+ rgb_t(0x00,0x00,0xff),
+ rgb_t(0x00,0x00,0x00)
};
--x;
- galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : MAKE_RGB(0xff,0x00,0xff));
+ galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : rgb_t(0xff,0x00,0xff));
--x;
- galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : MAKE_RGB(0xff,0x00,0xff));
+ galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : rgb_t(0xff,0x00,0xff));
--x;
- galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : MAKE_RGB(0xff,0x00,0xff));
+ galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : rgb_t(0xff,0x00,0xff));
--x;
- galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : MAKE_RGB(0xff,0x00,0xff));
+ galaxian_draw_pixel(bitmap, cliprect, y, x, ((x & 0x40) == 0) ? colors[(x >> 2) & 7] : rgb_t(0xff,0x00,0xff));
}
@@ -1154,7 +1154,7 @@ void galaxian_state::scramble_draw_bullet(bitmap_rgb32 &bitmap, const rectangle
rendered as yellow.
*/
x -= 6;
- galaxian_draw_pixel(bitmap, cliprect, y, x, MAKE_RGB(0xff,0xff,0x00));
+ galaxian_draw_pixel(bitmap, cliprect, y, x, rgb_t(0xff,0xff,0x00));
}
@@ -1162,10 +1162,10 @@ void galaxian_state::theend_draw_bullet(bitmap_rgb32 &bitmap, const rectangle &c
{
/* Same as galaxian except blue/green are swapped */
x -= 4;
- galaxian_draw_pixel(bitmap, cliprect, y, x++, MAKE_RGB(RGB_RED(m_bullet_color[offs]), RGB_BLUE(m_bullet_color[offs]), RGB_GREEN(m_bullet_color[offs])));
- galaxian_draw_pixel(bitmap, cliprect, y, x++, MAKE_RGB(RGB_RED(m_bullet_color[offs]), RGB_BLUE(m_bullet_color[offs]), RGB_GREEN(m_bullet_color[offs])));
- galaxian_draw_pixel(bitmap, cliprect, y, x++, MAKE_RGB(RGB_RED(m_bullet_color[offs]), RGB_BLUE(m_bullet_color[offs]), RGB_GREEN(m_bullet_color[offs])));
- galaxian_draw_pixel(bitmap, cliprect, y, x++, MAKE_RGB(RGB_RED(m_bullet_color[offs]), RGB_BLUE(m_bullet_color[offs]), RGB_GREEN(m_bullet_color[offs])));
+ galaxian_draw_pixel(bitmap, cliprect, y, x++, rgb_t(m_bullet_color[offs].r(), m_bullet_color[offs].b(), m_bullet_color[offs].g()));
+ galaxian_draw_pixel(bitmap, cliprect, y, x++, rgb_t(m_bullet_color[offs].r(), m_bullet_color[offs].b(), m_bullet_color[offs].g()));
+ galaxian_draw_pixel(bitmap, cliprect, y, x++, rgb_t(m_bullet_color[offs].r(), m_bullet_color[offs].b(), m_bullet_color[offs].g()));
+ galaxian_draw_pixel(bitmap, cliprect, y, x++, rgb_t(m_bullet_color[offs].r(), m_bullet_color[offs].b(), m_bullet_color[offs].g()));
}
diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c
index 56644d888d0..51a2c14f54b 100644
--- a/src/mame/video/galaxold.c
+++ b/src/mame/video/galaxold.c
@@ -79,8 +79,8 @@ PALETTE_INIT_MEMBER(galaxold_state,galaxold)
/* bullets - yellow and white */
- palette_set_color(machine(),BULLETS_COLOR_BASE+0,MAKE_RGB(0xef,0xef,0x00));
- palette_set_color(machine(),BULLETS_COLOR_BASE+1,MAKE_RGB(0xef,0xef,0xef));
+ palette_set_color(machine(),BULLETS_COLOR_BASE+0,rgb_t(0xef,0xef,0x00));
+ palette_set_color(machine(),BULLETS_COLOR_BASE+1,rgb_t(0xef,0xef,0xef));
}
PALETTE_INIT_MEMBER(galaxold_state,scrambold)
@@ -89,7 +89,7 @@ PALETTE_INIT_MEMBER(galaxold_state,scrambold)
/* blue background - 390 ohm resistor */
- palette_set_color(machine(),BACKGROUND_COLOR_BASE,MAKE_RGB(0,0,0x56));
+ palette_set_color(machine(),BACKGROUND_COLOR_BASE,rgb_t(0,0,0x56));
}
@@ -198,8 +198,8 @@ PALETTE_INIT_MEMBER(galaxold_state,darkplnt)
/* bullets - red and blue */
- palette_set_color(machine(),BULLETS_COLOR_BASE+0,MAKE_RGB(0xef,0x00,0x00));
- palette_set_color(machine(),BULLETS_COLOR_BASE+1,MAKE_RGB(0x00,0x00,0xef));
+ palette_set_color(machine(),BULLETS_COLOR_BASE+0,rgb_t(0xef,0x00,0x00));
+ palette_set_color(machine(),BULLETS_COLOR_BASE+1,rgb_t(0x00,0x00,0xef));
}
PALETTE_INIT_MEMBER(galaxold_state,minefld)
@@ -324,8 +324,8 @@ PALETTE_INIT_MEMBER(galaxold_state,dambustr)
/* bullets - yellow and white */
- palette_set_color(machine(),BULLETS_COLOR_BASE+0,MAKE_RGB(0xef,0xef,0x00));
- palette_set_color(machine(),BULLETS_COLOR_BASE+1,MAKE_RGB(0xef,0xef,0xef));
+ palette_set_color(machine(),BULLETS_COLOR_BASE+0,rgb_t(0xef,0xef,0x00));
+ palette_set_color(machine(),BULLETS_COLOR_BASE+1,rgb_t(0xef,0xef,0xef));
/*
Assumption (not clear from the schematics):
diff --git a/src/mame/video/galivan.c b/src/mame/video/galivan.c
index fcaadff8e34..b5a1b5655dc 100644
--- a/src/mame/video/galivan.c
+++ b/src/mame/video/galivan.c
@@ -67,7 +67,7 @@ void galivan_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/gameplan.c b/src/mame/video/gameplan.c
index 0744495e211..d7bb5efdfb0 100644
--- a/src/mame/video/gameplan.c
+++ b/src/mame/video/gameplan.c
@@ -66,7 +66,7 @@ void gameplan_state::gameplan_get_pens( pen_t *pens )
offs_t i;
for (i = 0; i < GAMEPLAN_NUM_PENS; i++)
- pens[i] = MAKE_RGB(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
+ pens[i] = rgb_t(pal1bit(i >> 0), pal1bit(i >> 1), pal1bit(i >> 2));
}
@@ -82,7 +82,7 @@ void gameplan_state::leprechn_get_pens( pen_t *pens )
UINT8 g = (i & 2) ? 0xff : bk;
UINT8 b = (i & 4) ? 0xff : bk;
- pens[i] = MAKE_RGB(r, g, b);
+ pens[i] = rgb_t(r, g, b);
}
}
diff --git a/src/mame/video/gaplus.c b/src/mame/video/gaplus.c
index ab1618bf526..7a611c50bbf 100644
--- a/src/mame/video/gaplus.c
+++ b/src/mame/video/gaplus.c
@@ -54,7 +54,7 @@ void gaplus_state::palette_init()
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- colortable_palette_set_color(machine().colortable,i,MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable,i,rgb_t(r,g,b));
}
color_prom += 0x300;
diff --git a/src/mame/video/gberet.c b/src/mame/video/gberet.c
index 58bf44a2997..dcaed14e408 100644
--- a/src/mame/video/gberet.c
+++ b/src/mame/video/gberet.c
@@ -53,7 +53,7 @@ PALETTE_INIT_MEMBER(gberet_state,gberet)
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/gomoku.c b/src/mame/video/gomoku.c
index 57e2c51b374..efbdec99b70 100644
--- a/src/mame/video/gomoku.c
+++ b/src/mame/video/gomoku.c
@@ -42,7 +42,7 @@ void gomoku_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(),i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(),i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/video/gottlieb.c b/src/mame/video/gottlieb.c
index e408cbf708c..d659bf2811c 100644
--- a/src/mame/video/gottlieb.c
+++ b/src/mame/video/gottlieb.c
@@ -32,7 +32,7 @@ WRITE8_MEMBER(gottlieb_state::gottlieb_paletteram_w)
/* alpha is set to 0 if laserdisc video is enabled */
a = (m_transparent0 && offset / 2 == 0) ? 0 : 255;
- palette_set_color(machine(), offset / 2, MAKE_ARGB(a, r, g, b));
+ palette_set_color(machine(), offset / 2, rgb_t(a, r, g, b));
}
diff --git a/src/mame/video/gotya.c b/src/mame/video/gotya.c
index 2caf160e56a..332a9f0f73d 100644
--- a/src/mame/video/gotya.c
+++ b/src/mame/video/gotya.c
@@ -49,7 +49,7 @@ void gotya_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/grchamp.c b/src/mame/video/grchamp.c
index 2de1ccf5dc2..bc8210f67fd 100644
--- a/src/mame/video/grchamp.c
+++ b/src/mame/video/grchamp.c
@@ -47,7 +47,7 @@ void grchamp_state::palette_init()
bit1 = (color_prom[i] >> 7) & 1;
b = combine_2_weights(bweights, bit0, bit1);
- m_bgcolor[i] = MAKE_RGB(r, g, b);
+ m_bgcolor[i] = rgb_t(r, g, b);
}
}
@@ -346,14 +346,14 @@ UINT32 grchamp_state::screen_update_grchamp(screen_device &screen, bitmap_rgb32
{
static const rgb_t objpix_lookup[8] =
{
- MAKE_RGB(0,0,0),
- MAKE_RGB(0,0,RGB_MAX),
- MAKE_RGB(0,RGB_MAX,0),
- MAKE_RGB(0,RGB_MAX,RGB_MAX),
- MAKE_RGB(RGB_MAX,0,0),
- MAKE_RGB(RGB_MAX,0,RGB_MAX),
- MAKE_RGB(RGB_MAX,RGB_MAX,0),
- MAKE_RGB(RGB_MAX,RGB_MAX,RGB_MAX)
+ rgb_t(0,0,0),
+ rgb_t(0,0,RGB_MAX),
+ rgb_t(0,RGB_MAX,0),
+ rgb_t(0,RGB_MAX,RGB_MAX),
+ rgb_t(RGB_MAX,0,0),
+ rgb_t(RGB_MAX,0,RGB_MAX),
+ rgb_t(RGB_MAX,RGB_MAX,0),
+ rgb_t(RGB_MAX,RGB_MAX,RGB_MAX)
};
const UINT8 *amedata = memregion("gfx5")->base();
@@ -523,11 +523,11 @@ mame_printf_debug("Collide bg/object @ (%d,%d)\n", x, y);
/* in which case it's black */
else
- finalpix = MAKE_RGB(0,0,0);
+ finalpix = rgb_t(0,0,0);
/* if the headlamp is visible, adjust the brightness */
if (headbit)
- finalpix += MAKE_RGB(64,64,64);
+ finalpix += rgb_t(64,64,64);
dest[x] = finalpix;
}
diff --git a/src/mame/video/gsword.c b/src/mame/video/gsword.c
index fdca1b1a652..ffd17a4df94 100644
--- a/src/mame/video/gsword.c
+++ b/src/mame/video/gsword.c
@@ -24,7 +24,7 @@ PALETTE_INIT_MEMBER(gsword_state,josvolly)
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
@@ -75,7 +75,7 @@ PALETTE_INIT_MEMBER(gsword_state,gsword)
bit2 = (color_prom[i + 0x000] >> 3) & 1;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c
index 5167e707aa4..e86ef87fa47 100644
--- a/src/mame/video/gticlub.c
+++ b/src/mame/video/gticlub.c
@@ -133,7 +133,7 @@ static void K001006_w(int chip, int offset, UINT32 data, UINT32 mem_mask)
b |= (b >> 5);
g |= (g >> 5);
r |= (r >> 5);
- K001006_palette[chip][index>>1] = MAKE_ARGB(a, r, g, b);
+ K001006_palette[chip][index>>1] = rgb_t(a, r, g, b);
K001006_addr[chip] += 2;
break;
diff --git a/src/mame/video/gunsmoke.c b/src/mame/video/gunsmoke.c
index 0df16058208..69ffd301ff0 100644
--- a/src/mame/video/gunsmoke.c
+++ b/src/mame/video/gunsmoke.c
@@ -31,7 +31,7 @@ void gunsmoke_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/gyruss.c b/src/mame/video/gyruss.c
index 2c8373f73fb..1fa77aa97b6 100644
--- a/src/mame/video/gyruss.c
+++ b/src/mame/video/gyruss.c
@@ -69,7 +69,7 @@ void gyruss_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(weights_b, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/hanaawas.c b/src/mame/video/hanaawas.c
index 91b50c872a1..ef208285b61 100644
--- a/src/mame/video/hanaawas.c
+++ b/src/mame/video/hanaawas.c
@@ -47,7 +47,7 @@ void hanaawas_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/harddriv.c b/src/mame/video/harddriv.c
index 66faafef031..262a0f04b71 100644
--- a/src/mame/video/harddriv.c
+++ b/src/mame/video/harddriv.c
@@ -330,7 +330,7 @@ INLINE void gsp_palette_change(running_machine &machine, int offset)
int red = (state->m_gsp_paletteram_lo[offset] >> 8) & 0xff;
int green = state->m_gsp_paletteram_lo[offset] & 0xff;
int blue = state->m_gsp_paletteram_hi[offset] & 0xff;
- palette_set_color(machine, offset, MAKE_RGB(red, green, blue));
+ palette_set_color(machine, offset, rgb_t(red, green, blue));
}
diff --git a/src/mame/video/hcastle.c b/src/mame/video/hcastle.c
index 6dd508e74e3..30c28a7f2dd 100644
--- a/src/mame/video/hcastle.c
+++ b/src/mame/video/hcastle.c
@@ -49,7 +49,7 @@ void hcastle_state::set_pens()
{
UINT16 data = m_paletteram[i | 1] | (m_paletteram[i] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
diff --git a/src/mame/video/higemaru.c b/src/mame/video/higemaru.c
index bebc7bd9016..931d02f6f31 100644
--- a/src/mame/video/higemaru.c
+++ b/src/mame/video/higemaru.c
@@ -51,7 +51,7 @@ void higemaru_state::palette_init()
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c
index 1bb2c265f09..a24bc0967fb 100644
--- a/src/mame/video/hng64.c
+++ b/src/mame/video/hng64.c
@@ -356,11 +356,11 @@ static void transition_control(running_machine &machine, bitmap_rgb32 &bitmap, c
{
for (j = cliprect.min_y; j < cliprect.max_y; j++)
{
- UINT32* thePixel = &bitmap.pix32(j, i);
+ rgb_t* thePixel = reinterpret_cast<rgb_t *>(&bitmap.pix32(j, i));
- finR = (INT32)RGB_RED(*thePixel);
- finG = (INT32)RGB_GREEN(*thePixel);
- finB = (INT32)RGB_BLUE(*thePixel);
+ finR = (INT32)thePixel->r();
+ finG = (INT32)thePixel->g();
+ finB = (INT32)thePixel->b();
#if 0
// Apply the darkening pass (0x07)...
@@ -368,9 +368,9 @@ static void transition_control(running_machine &machine, bitmap_rgb32 &bitmap, c
colorScaleG = 1.0f - (float)((hng64_tcram[0x00000007] >> 8) & 0xff) / 255.0f;
colorScaleB = 1.0f - (float)((hng64_tcram[0x00000007] >> 16) & 0xff) / 255.0f;
- finR = ((float)RGB_RED(*thePixel) * colorScaleR);
- finG = ((float)RGB_GREEN(*thePixel) * colorScaleG);
- finB = ((float)RGB_BLUE(*thePixel) * colorScaleB);
+ finR = ((float)thePixel->r() * colorScaleR);
+ finG = ((float)thePixel->g() * colorScaleG);
+ finB = ((float)thePixel->b() * colorScaleB);
// Apply the lightening pass (0x0a)...
@@ -416,7 +416,7 @@ static void transition_control(running_machine &machine, bitmap_rgb32 &bitmap, c
if (finG < 0) finG = 0;
if (finB < 0) finB = 0;
- *thePixel = MAKE_ARGB(255, (UINT8)finR, (UINT8)finG, (UINT8)finB);
+ *thePixel = rgb_t(255, (UINT8)finR, (UINT8)finG, (UINT8)finB);
}
}
}
@@ -2521,7 +2521,7 @@ void hng64_state::clear3d()
for (i = 0; i < (visarea.max_x)*(visarea.max_y); i++)
{
m_depthBuffer3d[i] = 100.0f;
- m_colorBuffer3d[i] = MAKE_ARGB(0, 0, 0, 0);
+ m_colorBuffer3d[i] = rgb_t(0, 0, 0, 0);
}
// Set some matrices to the identity...
@@ -2855,7 +2855,7 @@ static void DrawWireframe(running_machine &machine, struct polygon *p)
{
// mame_printf_debug("now drawing : %f %f %f, %f %f %f\n", p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[j].clipCoords[2], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[2]);
// mame_printf_debug("%f %f %f %f\n", p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1]);
- UINT32 color = MAKE_ARGB((UINT8)255, (UINT8)255, (UINT8)0, (UINT8)0);
+ UINT32 color = rgb_t((UINT8)255, (UINT8)255, (UINT8)0, (UINT8)0);
drawline2d(machine, p->vert[j].clipCoords[0], p->vert[j].clipCoords[1], p->vert[(j+1)%p->n].clipCoords[0], p->vert[(j+1)%p->n].clipCoords[1], color);
}
@@ -2923,13 +2923,13 @@ INLINE void FillSmoothTexPCHorizontalLine(running_machine &machine,
if ((prOptions.debugColor & 0xff000000) == 0x01000000)
{
// UV COLOR MODE
- *cb = MAKE_ARGB(255, (UINT8)(s_coord*255.0f), (UINT8)(t_coord*255.0f), (UINT8)(0));
+ *cb = rgb_t(255, (UINT8)(s_coord*255.0f), (UINT8)(t_coord*255.0f), (UINT8)(0));
*db = z_start;
}
else if ((prOptions.debugColor & 0xff000000) == 0x02000000)
{
// Lit
- *cb = MAKE_ARGB(255, (UINT8)(r_start/w_start), (UINT8)(g_start/w_start), (UINT8)(b_start/w_start));
+ *cb = rgb_t(255, (UINT8)(r_start/w_start), (UINT8)(g_start/w_start), (UINT8)(b_start/w_start));
*db = z_start;
}
else if ((prOptions.debugColor & 0xff000000) == 0xff000000)
@@ -2971,26 +2971,26 @@ INLINE void FillSmoothTexPCHorizontalLine(running_machine &machine,
{
// The color out of the texture
paletteEntry %= prOptions.palPageSize;
- UINT32 color = machine.pens[prOptions.palOffset + paletteEntry];
+ rgb_t color = machine.pens[prOptions.palOffset + paletteEntry];
// Apply the lighting
float rIntensity = (r_start/w_start) / 255.0f;
float gIntensity = (g_start/w_start) / 255.0f;
float bIntensity = (b_start/w_start) / 255.0f;
- float red = RGB_RED(color) * rIntensity;
- float green = RGB_GREEN(color) * gIntensity;
- float blue = RGB_BLUE(color) * bIntensity;
+ float red = color.r() * rIntensity;
+ float green = color.g() * gIntensity;
+ float blue = color.b() * bIntensity;
// Clamp and finalize
- red = RGB_RED(color) + red;
- green = RGB_GREEN(color) + green;
- blue = RGB_BLUE(color) + blue;
+ red = color.r() + red;
+ green = color.g() + green;
+ blue = color.b() + blue;
if (red >= 255) red = 255;
if (green >= 255) green = 255;
if (blue >= 255) blue = 255;
- color = MAKE_ARGB(255, (UINT8)red, (UINT8)green, (UINT8)blue);
+ color = rgb_t(255, (UINT8)red, (UINT8)green, (UINT8)blue);
*cb = color;
*db = z_start;
diff --git a/src/mame/video/homerun.c b/src/mame/video/homerun.c
index f762b2a9bb2..03fb4302e35 100644
--- a/src/mame/video/homerun.c
+++ b/src/mame/video/homerun.c
@@ -87,7 +87,7 @@ WRITE8_MEMBER(homerun_state::homerun_color_w)
bit2 = (data >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), offset, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), offset, rgb_t(r,g,b));
}
diff --git a/src/mame/video/hyhoo.c b/src/mame/video/hyhoo.c
index c0f22ba752a..ff39321825b 100644
--- a/src/mame/video/hyhoo.c
+++ b/src/mame/video/hyhoo.c
@@ -145,7 +145,7 @@ void hyhoo_state::hyhoo_gfxdraw()
g = ((color & 0x18) >> 3) & 0x03;
b = ((color & 0xe0) >> 5) & 0x07;
- pen = MAKE_RGB(pal6bit(r), pal5bit(g), pal5bit(b));
+ pen = rgb_t(pal6bit(r), pal5bit(g), pal5bit(b));
m_tmpbitmap.pix32(dy, dx1) = m_tmpbitmap.pix32(dy, dx1) | pen;
m_tmpbitmap.pix32(dy, dx2) = m_tmpbitmap.pix32(dy, dx2) | pen;
@@ -161,7 +161,7 @@ void hyhoo_state::hyhoo_gfxdraw()
g = ((color & 0x38) >> 3) & 0x07;
b = ((color & 0xc0) >> 6) & 0x03;
- pen = MAKE_RGB(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
+ pen = rgb_t(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
m_tmpbitmap.pix32(dy, dx1) = pen;
m_tmpbitmap.pix32(dy, dx2) = pen;
@@ -194,7 +194,7 @@ void hyhoo_state::hyhoo_gfxdraw()
g = ((~m_clut[color1] & 0x38) >> 3) & 0x07;
b = ((~m_clut[color1] & 0xc0) >> 6) & 0x03;
- pen = MAKE_RGB(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
+ pen = rgb_t(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
m_tmpbitmap.pix32(dy, dx1) = pen;
}
@@ -208,7 +208,7 @@ void hyhoo_state::hyhoo_gfxdraw()
g = ((~m_clut[color2] & 0x38) >> 3) & 0x07;
b = ((~m_clut[color2] & 0xc0) >> 6) & 0x03;
- pen = MAKE_RGB(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
+ pen = rgb_t(pal6bit(r << 3), pal5bit(g << 2), pal5bit(b << 3));
m_tmpbitmap.pix32(dy, dx2) = pen;
}
@@ -234,7 +234,7 @@ UINT32 hyhoo_state::screen_update_hyhoo(screen_device &screen, bitmap_rgb32 &bit
if (m_dispflag)
copybitmap(bitmap, m_tmpbitmap, m_flipscreen, m_flipscreen, 0, 0, cliprect);
else
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::black, cliprect);
return 0;
}
diff --git a/src/mame/video/hyperspt.c b/src/mame/video/hyperspt.c
index 27f6c6dbdad..514f5e33d9e 100644
--- a/src/mame/video/hyperspt.c
+++ b/src/mame/video/hyperspt.c
@@ -69,7 +69,7 @@ void hyperspt_state::palette_init()
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/ikki.c b/src/mame/video/ikki.c
index 82be44bb7e1..d0472fff4e3 100644
--- a/src/mame/video/ikki.c
+++ b/src/mame/video/ikki.c
@@ -26,7 +26,7 @@ void ikki_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/irobot.c b/src/mame/video/irobot.c
index db3214cae23..2faf4be6d35 100644
--- a/src/mame/video/irobot.c
+++ b/src/mame/video/irobot.c
@@ -53,7 +53,7 @@ void irobot_state::palette_init()
int swapped_i = BITSWAP8(i,7,6,5,4,3,0,1,2);
- palette_set_color(machine(), swapped_i + 64, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), swapped_i + 64, rgb_t(r, g, b));
}
}
@@ -72,7 +72,7 @@ WRITE8_MEMBER(irobot_state::irobot_paletteram_w)
g = 12 * bits * intensity;
bits = (color >> 7) & 0x03;
r = 12 * bits * intensity;
- palette_set_color(machine(),(offset >> 1) & 0x3F,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),(offset >> 1) & 0x3F,rgb_t(r,g,b));
}
diff --git a/src/mame/video/ironhors.c b/src/mame/video/ironhors.c
index b09a8fadcac..d7c30004644 100644
--- a/src/mame/video/ironhors.c
+++ b/src/mame/video/ironhors.c
@@ -59,7 +59,7 @@ void ironhors_state::palette_init()
bit3 = (color_prom[i + 0x200] >> 3) & 0x01;
b = combine_4_weights(bweights, bit0, bit1, bit2, bit3);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table,*/
diff --git a/src/mame/video/itech32.c b/src/mame/video/itech32.c
index 1ee830be526..1a850dcd526 100644
--- a/src/mame/video/itech32.c
+++ b/src/mame/video/itech32.c
@@ -311,7 +311,7 @@ WRITE16_MEMBER(itech32_state::timekill_paletteram_w)
g = m_generic_paletteram_16[offset & ~1] >> 8;
b = m_generic_paletteram_16[offset | 1] >> 8;
- palette_set_color(machine(), offset / 2, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset / 2, rgb_t(r, g, b));
}
@@ -328,7 +328,7 @@ WRITE16_MEMBER(itech32_state::bloodstm_paletteram_w)
g = m_generic_paletteram_16[offset & ~1] >> 8;
b = m_generic_paletteram_16[offset | 1] & 0xff;
- palette_set_color(machine(), offset / 2, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset / 2, rgb_t(r, g, b));
}
@@ -342,7 +342,7 @@ WRITE32_MEMBER(itech32_state::drivedge_paletteram_w)
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
b = (m_generic_paletteram_32[offset] >> 16) & 0xff;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
@@ -356,7 +356,7 @@ WRITE32_MEMBER(itech32_state::itech020_paletteram_w)
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
b = m_generic_paletteram_32[offset] & 0xff;
- palette_set_color(machine(), offset, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), offset, rgb_t(r, g, b));
}
diff --git a/src/mame/video/itech8.c b/src/mame/video/itech8.c
index a9e6c55d156..201bb2f2eeb 100644
--- a/src/mame/video/itech8.c
+++ b/src/mame/video/itech8.c
@@ -556,7 +556,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(itech8_state::grmatch_palette_update)
{
UINT8 data0 = base[x * 2 + 0];
UINT8 data1 = base[x * 2 + 1];
- m_grmatch_palette[page][x] = MAKE_RGB(pal4bit(data0 >> 0), pal4bit(data1 >> 4), pal4bit(data1 >> 0));
+ m_grmatch_palette[page][x] = rgb_t(pal4bit(data0 >> 0), pal4bit(data1 >> 4), pal4bit(data1 >> 0));
}
}
}
diff --git a/src/mame/video/jack.c b/src/mame/video/jack.c
index ea0e6ba8caf..6a3cc36f81b 100644
--- a/src/mame/video/jack.c
+++ b/src/mame/video/jack.c
@@ -165,7 +165,7 @@ PALETTE_INIT_MEMBER(jack_state,joinem)
bit2 = (color_prom[i] >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r,g,b));
+ palette_set_color(machine(), i, rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/jackal.c b/src/mame/video/jackal.c
index a9ebc70cbd5..ed93c1bc5e2 100644
--- a/src/mame/video/jackal.c
+++ b/src/mame/video/jackal.c
@@ -48,7 +48,7 @@ void jackal_state::set_pens( )
{
UINT16 data = m_paletteram[i] | (m_paletteram[i | 1] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
diff --git a/src/mame/video/jaguar.c b/src/mame/video/jaguar.c
index cdbdce829fb..be5fd7f8023 100644
--- a/src/mame/video/jaguar.c
+++ b/src/mame/video/jaguar.c
@@ -372,7 +372,7 @@ void jaguar_state::set_palette(UINT16 vmode)
UINT8 r = (red_lookup[i >> 8] * (i & 0xff)) >> 8;
UINT8 g = (grn_lookup[i >> 8] * (i & 0xff)) >> 8;
UINT8 b = (blu_lookup[i >> 8] * (i & 0xff)) >> 8;
- m_pen_table[i] = MAKE_RGB(r, g, b);
+ m_pen_table[i] = rgb_t(r, g, b);
}
break;
@@ -394,7 +394,7 @@ void jaguar_state::set_palette(UINT16 vmode)
g = (g << 3) | (g >> 2);
b = (b << 3) | (b >> 2);
}
- m_pen_table[i] = MAKE_RGB(r, g, b);
+ m_pen_table[i] = rgb_t(r, g, b);
}
break;
@@ -403,16 +403,16 @@ void jaguar_state::set_palette(UINT16 vmode)
for (i = 0; i < 65536; i++)
{
if (i & 1) // FIXME: controls RGB 5-5-5 / 5-6-5 format or it's just ignored? Used by UBI Soft logo in Rayman
- m_pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal5bit(i >> 1), pal5bit(i >> 6));
+ m_pen_table[i] = rgb_t(pal5bit(i >> 11), pal5bit(i >> 1), pal5bit(i >> 6));
else
- m_pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6));
+ m_pen_table[i] = rgb_t(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6));
}
break;
/* RGB full */
case 0x006:
for (i = 0; i < 65536; i++)
- m_pen_table[i] = MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6));
+ m_pen_table[i] = rgb_t(pal5bit(i >> 11), pal6bit(i >> 0), pal5bit(i >> 6));
break;
/* others */
@@ -760,7 +760,7 @@ void jaguar_state::scanline_update(int param)
/* if we are first on this scanline, clear to the border color */
if (ENABLE_BORDERS && vc % 2 == 0)
{
- rgb_t border = MAKE_RGB(m_gpu_regs[BORD1] & 0xff, m_gpu_regs[BORD1] >> 8, m_gpu_regs[BORD2] & 0xff);
+ rgb_t border = rgb_t(m_gpu_regs[BORD1] & 0xff, m_gpu_regs[BORD1] >> 8, m_gpu_regs[BORD2] & 0xff);
for (x = visarea.min_x; x <= visarea.max_x; x++)
dest[x] = border;
}
@@ -777,7 +777,7 @@ void jaguar_state::scanline_update(int param)
UINT8 r = m_pen_table[(scanline[x]&0xff)|256];
UINT8 g = m_pen_table[(scanline[x]>>8)|512];
UINT8 b = m_pen_table[scanline[x+1]&0xff];
- dest[hdb++] = MAKE_RGB(r, g, b);
+ dest[hdb++] = rgb_t(r, g, b);
}
}
else
diff --git a/src/mame/video/jailbrek.c b/src/mame/video/jailbrek.c
index 9798663ffc9..9387e29fdc5 100644
--- a/src/mame/video/jailbrek.c
+++ b/src/mame/video/jailbrek.c
@@ -16,7 +16,7 @@ void jailbrek_state::palette_init()
int g = pal4bit(color_prom[i + 0x00] >> 4);
int b = pal4bit(color_prom[i + 0x20] >> 0);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/jalblend.c b/src/mame/video/jalblend.c
index 73d2b29facb..398144dad37 100644
--- a/src/mame/video/jalblend.c
+++ b/src/mame/video/jalblend.c
@@ -60,13 +60,13 @@ rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha)
int r, g, b;
int ir, ig, ib;
- r = (int)RGB_RED (dest);
- g = (int)RGB_GREEN(dest);
- b = (int)RGB_BLUE (dest);
+ r = (int)dest.r();
+ g = (int)dest.g();
+ b = (int)dest.b();
- ir = (int)RGB_RED (addMe);
- ig = (int)RGB_GREEN(addMe);
- ib = (int)RGB_BLUE (addMe);
+ ir = (int)addMe.r();
+ ig = (int)addMe.g();
+ ib = (int)addMe.b();
if (alpha & 4)
{ r -= ir; if (r < 0) r = 0; }
@@ -81,7 +81,7 @@ rgb_t jal_blend_func(rgb_t dest, rgb_t addMe, UINT8 alpha)
else
{ b += ib; if (b > 255) b = 255; }
- return MAKE_RGB(r,g,b);
+ return rgb_t(r,g,b);
}
template<class _BitmapClass>
diff --git a/src/mame/video/jedi.c b/src/mame/video/jedi.c
index 35bf4745e32..a2a5bde2217 100644
--- a/src/mame/video/jedi.c
+++ b/src/mame/video/jedi.c
@@ -81,7 +81,7 @@ void jedi_state::get_pens(pen_t *pens)
bits = (color >> 0) & 7;
b = 5 * bits * intensity;
- pens[offs] = MAKE_RGB(r, g, b);
+ pens[offs] = rgb_t(r, g, b);
}
}
@@ -325,7 +325,7 @@ UINT32 jedi_state::screen_update_jedi(screen_device &screen, bitmap_rgb32 &bitma
{
/* if no video, clear it all to black */
if (*m_video_off & 0x01)
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::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 e8d11e87ce9..ab49147fd9b 100644
--- a/src/mame/video/jpmimpct.c
+++ b/src/mame/video/jpmimpct.c
@@ -48,7 +48,7 @@ WRITE16_MEMBER(jpmimpct_state::jpmimpct_bt477_w)
if (++*addr_cnt == 3)
{
- palette_set_color(machine(), m_bt477.address, MAKE_RGB(color[0], color[1], color[2]));
+ palette_set_color(machine(), m_bt477.address, rgb_t(color[0], color[1], color[2]));
*addr_cnt = 0;
/* Address register increments */
diff --git a/src/mame/video/k001006.c b/src/mame/video/k001006.c
index 2f83cd5dafc..4c1b52218a0 100644
--- a/src/mame/video/k001006.c
+++ b/src/mame/video/k001006.c
@@ -132,7 +132,7 @@ WRITE32_MEMBER( k001006_device::write )
b |= (b >> 5);
g |= (g >> 5);
r |= (r >> 5);
- m_palette[index >> 1] = MAKE_ARGB(a, r, g, b);
+ m_palette[index >> 1] = rgb_t(a, r, g, b);
m_addr += 2;
break;
diff --git a/src/mame/video/k053246_k053247_k055673.c b/src/mame/video/k053246_k053247_k055673.c
index 34b82720f3e..cf92777302d 100644
--- a/src/mame/video/k053246_k053247_k055673.c
+++ b/src/mame/video/k053246_k053247_k055673.c
@@ -786,12 +786,12 @@ void k053247_device::zdrawgfxzoom32GP(
src_fx += src_fdx;
src_x >>= FP;
if (eax < shdpen || szbuf_ptr[ecx*2] < z8 || szbuf_ptr[ecx*2+1] <= p8) continue;
- eax = dst_ptr[ecx];
+ rgb_t pix = dst_ptr[ecx];
szbuf_ptr[ecx*2] = z8;
szbuf_ptr[ecx*2+1] = p8;
// the shadow tables are 15-bit lookup tables which accept RGB15... lossy, nasty, yuck!
- dst_ptr[ecx] = shd_base[rgb_to_rgb15(eax)];
+ dst_ptr[ecx] = shd_base[pix.as_rgb15()];
//dst_ptr[ecx] =(eax>>3&0x001f);lend_r32( eax, 0x00000000, 128);
}
while (++ecx);
@@ -923,12 +923,12 @@ void k053247_device::zdrawgfxzoom32GP(
eax = *src_ptr;
src_ptr += src_fdx;
if (eax < shdpen || szbuf_ptr[ecx*2] < z8 || szbuf_ptr[ecx*2+1] <= p8) continue;
- eax = dst_ptr[ecx];
+ rgb_t pix = dst_ptr[ecx];
szbuf_ptr[ecx*2] = z8;
szbuf_ptr[ecx*2+1] = p8;
// the shadow tables are 15-bit lookup tables which accept RGB15... lossy, nasty, yuck!
- dst_ptr[ecx] = shd_base[rgb_to_rgb15(eax)];
+ dst_ptr[ecx] = shd_base[pix.as_rgb15()];
}
while (++ecx);
diff --git a/src/mame/video/kangaroo.c b/src/mame/video/kangaroo.c
index 4552080b552..db6e638dcce 100644
--- a/src/mame/video/kangaroo.c
+++ b/src/mame/video/kangaroo.c
@@ -144,7 +144,7 @@ UINT32 kangaroo_state::screen_update_kangaroo(screen_device &screen, bitmap_rgb3
/* build up the pens arrays */
for (x = 0; x < 8; x++)
- pens[x] = MAKE_RGB(pal1bit(x >> 2), pal1bit(x >> 1), pal1bit(x >> 0));
+ pens[x] = rgb_t(pal1bit(x >> 2), pal1bit(x >> 1), pal1bit(x >> 0));
/* iterate over pixels */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
diff --git a/src/mame/video/karnov.c b/src/mame/video/karnov.c
index 290b0d576e0..2f9ef4140df 100644
--- a/src/mame/video/karnov.c
+++ b/src/mame/video/karnov.c
@@ -60,7 +60,7 @@ void karnov_state::palette_init()
bit3 = (color_prom[machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/video/kingobox.c b/src/mame/video/kingobox.c
index cbe95d05398..6753e926a35 100644
--- a/src/mame/video/kingobox.c
+++ b/src/mame/video/kingobox.c
@@ -74,7 +74,7 @@ void kingofb_state::palette_init_common( const UINT8 *color_prom, void (kingofb_
bit3 = (b_data >> 3) & 0x01;
b = combine_4_weights(bweights, bit0, bit1, bit2, bit3);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* the foreground chars directly map to primary colors */
@@ -91,7 +91,7 @@ void kingofb_state::palette_init_common( const UINT8 *color_prom, void (kingofb_
/* blue component */
b = (((i - 0x100) >> 0) & 0x01) * bweights_fg[0];
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
for (i = 0; i < 0x100; i++)
diff --git a/src/mame/video/kncljoe.c b/src/mame/video/kncljoe.c
index fbde4501716..3b6c85180b8 100644
--- a/src/mame/video/kncljoe.c
+++ b/src/mame/video/kncljoe.c
@@ -29,7 +29,7 @@ void kncljoe_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
for (i = 0x80; i < 0x90; i++)
@@ -55,7 +55,7 @@ void kncljoe_state::palette_init()
bit2 = (color_prom[(i - 0x80) + 0x300] >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c
index 34f06c9b050..f395208e56e 100644
--- a/src/mame/video/konamigx.c
+++ b/src/mame/video/konamigx.c
@@ -1679,7 +1679,7 @@ UINT32 konamigx_state::screen_update_konamigx_left(screen_device &screen, bitmap
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
b = (m_generic_paletteram_32[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
}
@@ -1724,7 +1724,7 @@ UINT32 konamigx_state::screen_update_konamigx_right(screen_device &screen, bitma
g = (m_subpaletteram32[offset] >> 8) & 0xff;
b = (m_subpaletteram32[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
}
@@ -1746,7 +1746,7 @@ WRITE32_MEMBER(konamigx_state::konamigx_palette_w)
g = (m_generic_paletteram_32[offset] >> 8) & 0xff;
b = (m_generic_paletteram_32[offset] >> 0) & 0xff;
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
#ifdef UNUSED_FUNCTION
@@ -1762,7 +1762,7 @@ WRITE32_MEMBER(konamigx_state::konamigx_palette2_w)
offset += (0x8000/4);
- palette_set_color(machine(),offset,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),offset,rgb_t(r,g,b));
}
#endif
diff --git a/src/mame/video/kopunch.c b/src/mame/video/kopunch.c
index a5791edfd7b..8ad72743aa4 100644
--- a/src/mame/video/kopunch.c
+++ b/src/mame/video/kopunch.c
@@ -28,7 +28,7 @@ void kopunch_state::palette_init()
bit2 = (*color_prom >> 7) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
color_prom++;
}
}
diff --git a/src/mame/video/labyrunr.c b/src/mame/video/labyrunr.c
index 61ce0ce04b8..cf4a0375d5d 100644
--- a/src/mame/video/labyrunr.c
+++ b/src/mame/video/labyrunr.c
@@ -49,7 +49,7 @@ void labyrunr_state::set_pens( )
{
UINT16 data = m_paletteram[i | 1] | (m_paletteram[i] << 8);
- rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
+ rgb_t color = rgb_t(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
diff --git a/src/mame/video/ladybug.c b/src/mame/video/ladybug.c
index a067d08103a..647e62f5dca 100644
--- a/src/mame/video/ladybug.c
+++ b/src/mame/video/ladybug.c
@@ -66,7 +66,7 @@ static void palette_init_common( running_machine &machine, const UINT8 *color_pr
bit1 = (~color_prom[i] >> b_bit1) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine.colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine.colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
@@ -127,7 +127,7 @@ PALETTE_INIT_MEMBER(ladybug_state,sraider)
bit0 = ((i - 0x20) >> 0) & 0x01;
r = 0x47 * bit0;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
for (i = 0x60; i < 0x80; i++)
@@ -333,7 +333,7 @@ UINT32 ladybug_state::screen_update_sraider(screen_device &screen, bitmap_ind16
redclash_draw_stars(bitmap, cliprect, 0x60, 1, 0x00, 0xd8);
// draw the gridlines
- colortable_palette_set_color(machine().colortable, 0x40, MAKE_RGB(m_grid_color & 0x40 ? 0xff : 0,
+ colortable_palette_set_color(machine().colortable, 0x40, rgb_t(m_grid_color & 0x40 ? 0xff : 0,
m_grid_color & 0x20 ? 0xff : 0,
m_grid_color & 0x10 ? 0xff : 0));
m_grid_tilemap->draw(screen, bitmap, cliprect, 0, flip_screen());
diff --git a/src/mame/video/lasso.c b/src/mame/video/lasso.c
index 7cfd38e901d..17ab31564c0 100644
--- a/src/mame/video/lasso.c
+++ b/src/mame/video/lasso.c
@@ -60,7 +60,7 @@ rgb_t lasso_state::get_color( int data )
bit1 = (data >> 7) & 0x01;
b = 0x4f * bit0 + 0xa8 * bit1;
- return MAKE_RGB(r, g, b);
+ return rgb_t(r, g, b);
}
diff --git a/src/mame/video/lastduel.c b/src/mame/video/lastduel.c
index 52f9e6596c7..1ba7f64cd1e 100644
--- a/src/mame/video/lastduel.c
+++ b/src/mame/video/lastduel.c
@@ -188,7 +188,7 @@ WRITE16_MEMBER(lastduel_state::lastduel_palette_word_w)
green = ((data >> 8) & 0x0f) * bright * 0x11 / 0x1f;
blue = ((data >> 4) & 0x0f) * bright * 0x11 / 0x1f;
- palette_set_color (machine(), offset, MAKE_RGB(red, green, blue));
+ palette_set_color (machine(), offset, rgb_t(red, green, blue));
}
/***************************************************************************
diff --git a/src/mame/video/liberate.c b/src/mame/video/liberate.c
index b2129a6faee..e8dea2a8371 100644
--- a/src/mame/video/liberate.c
+++ b/src/mame/video/liberate.c
@@ -271,9 +271,9 @@ PALETTE_INIT_MEMBER(liberate_state,liberate)
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
color_prom++;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
- palette_set_color(machine(),32,MAKE_RGB(0,0,0)); /* Allocate black for when no background is displayed */
+ palette_set_color(machine(),32,rgb_t(0,0,0)); /* Allocate black for when no background is displayed */
}
/***************************************************************************/
diff --git a/src/mame/video/liberatr.c b/src/mame/video/liberatr.c
index f9131fff9ed..f1a3730b2d8 100644
--- a/src/mame/video/liberatr.c
+++ b/src/mame/video/liberatr.c
@@ -238,7 +238,7 @@ void liberatr_state::get_pens(pen_t *pens)
g = ((~data >> 0) & 0x07) * 0x24 + 3; if (g == 3) g = 0;
b = ((~data >> 5) & 0x06) * 0x24 + 3; if (b == 3) b = 0;
- pens[penmap[i]] = MAKE_RGB(r, g, b);
+ pens[penmap[i]] = rgb_t(r, g, b);
}
}
@@ -301,7 +301,7 @@ UINT32 liberatr_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
pen_t pens[NUM_PENS];
get_pens(pens);
- bitmap.fill(RGB_BLACK, cliprect);
+ bitmap.fill(rgb_t::black, cliprect);
draw_planet(bitmap, pens);
draw_bitmap(bitmap, pens);
diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c
index 019a3c410ca..d3195da868c 100644
--- a/src/mame/video/lockon.c
+++ b/src/mame/video/lockon.c
@@ -120,7 +120,7 @@ void lockon_state::palette_init()
b = compute_res_net((p1 & 0x1f), 2, &lockon_pd_net_info);
}
- palette_set_color(machine(), i, MAKE_RGB(r, g, b));
+ palette_set_color(machine(), i, rgb_t(r, g, b));
}
}
diff --git a/src/mame/video/lucky74.c b/src/mame/video/lucky74.c
index 8888521ddd6..837c247a353 100644
--- a/src/mame/video/lucky74.c
+++ b/src/mame/video/lucky74.c
@@ -188,10 +188,10 @@ void lucky74_state::palette_init()
/* PROMs circuitry, 1st state */
- palette_set_color(machine(), i, MAKE_RGB(r1, g1, b1));
+ palette_set_color(machine(), i, rgb_t(r1, g1, b1));
/* PROMs circuitry, 2nd state */
- palette_set_color(machine(), i + 256, MAKE_RGB(r2, g2, b2));
+ palette_set_color(machine(), i + 256, rgb_t(r2, g2, b2));
}
}
diff --git a/src/mame/video/lvcards.c b/src/mame/video/lvcards.c
index 92ad5bcc407..4c072dff31c 100644
--- a/src/mame/video/lvcards.c
+++ b/src/mame/video/lvcards.c
@@ -40,7 +40,7 @@ PALETTE_INIT_MEMBER(lvcards_state,ponttehk)
bit3 = (color_prom[2*machine().total_colors()] >> 3) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
color_prom++;
}
@@ -76,7 +76,7 @@ void lvcards_state::palette_init()//Ever so slightly different, but different en
bit3 = (color_prom[2*machine().total_colors()] >> 3) & 0x11;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/video/m52.c b/src/mame/video/m52.c
index 68e4208d642..78c91d64795 100644
--- a/src/mame/video/m52.c
+++ b/src/mame/video/m52.c
@@ -45,7 +45,7 @@ void m52_state::palette_init()
int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5));
int b = combine_2_weights(weights_b, BIT(promval,6), BIT(promval,7));
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r,g,b));
}
/* background palette */
@@ -56,7 +56,7 @@ void m52_state::palette_init()
int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5));
int b = combine_2_weights(weights_b, BIT(promval,6), BIT(promval,7));
- colortable_palette_set_color(machine().colortable, 512+i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, 512+i, rgb_t(r,g,b));
}
/* compute palette information for sprites */
@@ -73,7 +73,7 @@ void m52_state::palette_init()
int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5));
int b = combine_3_weights(weights_b, BIT(promval,0), BIT(promval,1), BIT(promval,2));
- colortable_palette_set_color(machine().colortable, 512 + 32 + i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, 512 + 32 + i, rgb_t(r,g,b));
}
/* character lookup table */
diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c
index df723ad81c8..9952eb07c6d 100644
--- a/src/mame/video/m57.c
+++ b/src/mame/video/m57.c
@@ -58,7 +58,7 @@ void m57_state::palette_init()
bit2 = (color_prom[0] >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r,g,b));
colortable_entry_set_value(machine().colortable, i, i);
color_prom++;
}
@@ -87,7 +87,7 @@ void m57_state::palette_init()
bit2 = (*color_prom >> 2) & 0x01;
b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
- colortable_palette_set_color(machine().colortable, i + 256, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, i + 256, rgb_t(r,g,b));
color_prom++;
}
diff --git a/src/mame/video/m58.c b/src/mame/video/m58.c
index 0480e018eca..c2cf796e936 100644
--- a/src/mame/video/m58.c
+++ b/src/mame/video/m58.c
@@ -49,7 +49,7 @@ void m58_state::palette_init()
int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5));
int b = combine_3_weights(weights_b, BIT(promval,0), BIT(promval,1), BIT(promval,2));
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r,g,b));
}
/* radar palette */
@@ -60,7 +60,7 @@ void m58_state::palette_init()
int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5));
int b = combine_3_weights(weights_b, BIT(promval,0), BIT(promval,1), BIT(promval,2));
- colortable_palette_set_color(machine().colortable, 256+i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, 256+i, rgb_t(r,g,b));
}
/* compute palette information for sprites */
@@ -77,7 +77,7 @@ void m58_state::palette_init()
int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5));
int b = combine_3_weights(weights_b, BIT(promval,0), BIT(promval,1), BIT(promval,2));
- colortable_palette_set_color(machine().colortable, 256+256+i, MAKE_RGB(r,g,b));
+ colortable_palette_set_color(machine().colortable, 256+256+i, rgb_t(r,g,b));
}
/* character lookup table */
diff --git a/src/mame/video/m62.c b/src/mame/video/m62.c
index 6d7380ed6d6..65da6b912e1 100644
--- a/src/mame/video/m62.c
+++ b/src/mame/video/m62.c
@@ -190,7 +190,7 @@ void m62_state::m62_amplify_contrast(palette_t *palette, UINT32 numcolors)
for (i=0;i < numcolors;i++)
{
rgb_t rgb = palette->entry_color(i);
- UINT32 y = 299 * RGB_RED(rgb) + 587 * RGB_GREEN(rgb) + 114 * RGB_BLUE(rgb);
+ UINT32 y = 299 * rgb.r() + 587 * rgb.g() + 114 * rgb.b();
ymax = MAX(ymax, y);
}
diff --git a/src/mame/video/madalien.c b/src/mame/video/madalien.c
index 1abb265a363..da2b55a6369 100644
--- a/src/mame/video/madalien.c
+++ b/src/mame/video/madalien.c
@@ -41,7 +41,7 @@ PALETTE_INIT_MEMBER(madalien_state,madalien)
if (BIT(color_prom[i], 5))
b += 0xc0;
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
for (i = 0; i < 0x10; i++)
diff --git a/src/mame/video/magmax.c b/src/mame/video/magmax.c
index 2eaf5f09786..0e83750d0a2 100644
--- a/src/mame/video/magmax.c
+++ b/src/mame/video/magmax.c
@@ -39,7 +39,7 @@ void magmax_state::palette_init()
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
diff --git a/src/mame/video/mainsnk.c b/src/mame/video/mainsnk.c
index 1f2b6b32a63..3a413b9276a 100644
--- a/src/mame/video/mainsnk.c
+++ b/src/mame/video/mainsnk.c
@@ -30,7 +30,7 @@ void mainsnk_state::palette_init()
bit3 = (color_prom[i + num_colors] >> 1) & 0x01;
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
- palette_set_color(machine(),i,MAKE_RGB(r,g,b));
+ palette_set_color(machine(),i,rgb_t(r,g,b));
}
}
diff --git a/src/mame/video/malzak.c b/src/mame/video/malzak.c
index 4ad9c365ebe..87f1ecbf63f 100644
--- a/src/mame/video/malzak.c
+++ b/src/mame/video/malzak.c
@@ -22,7 +22,7 @@ UINT32 malzak_state::screen_update_malzak(screen_device &screen, bitmap_rgb32 &b
int sx, sy;
int x,y;
- bitmap.fill(RGB_BLACK);
+ bitmap.fill(rgb_t::black);
m_trom->screen_update(screen, bitmap, cliprect);
diff --git a/src/mame/video/mappy.c b/src/mame/video/mappy.c
index b14c7d173db..b9d8bf95c21 100644
--- a/src/mame/video/mappy.c
+++ b/src/mame/video/mappy.c
@@ -69,7 +69,7 @@ PALETTE_INIT_MEMBER(mappy_state,superpac)
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
+ colortable_palette_set_color(machine().colortable, i, rgb_t(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
@@ -129,7 +129,7 @@ PALETTE_INIT_MEMBER(mappy_state,mappy)
bit1 = (color_prom[i] >> 7) & 0x01;
b = combine_2_weights(bweights, bit0, bit1);
- colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));