Mirage Source
http://www.miragesource.net/forums/

Transparent Color For Surfaces
http://www.miragesource.net/forums/viewtopic.php?f=210&t=932
Page 1 of 1

Author:  Tutorial Bot [ Sat Dec 23, 2006 10:01 pm ]
Post subject:  Transparent Color For Surfaces

Author: Enigmewave
Difficulty: 3/5

:: CLIENT SIDE ::
In modDirectX.bas, add:
Code:
Public Sub SetMaskColorFromPixel(ByRef TheSurface As DirectDrawSurface7, ByVal X As Long, ByVal Y As Long)
Dim TmpR As RECT
Dim TmpDDSD As DDSURFACEDESC2
Dim TmpColorKey As DDCOLORKEY

With TmpR
        .Left = X
        .Top = Y
        .Right = X
        .Bottom = Y
End With

TheSurface.Lock TmpR, TmpDDSD, DDLOCK_WAIT Or DDLOCK_READONLY, 0

With TmpColorKey
        .low = TheSurface.GetLockedPixel(X, Y)
        .high = .low
End With

TheSurface.SetColorKey DDCKEY_SRCBLT, TmpColorKey

TheSurface.Unlock TmpR
End Sub


In sub InitSurfaces, replace:
Code:
DD_SpriteSurf.SetColorKey DDCKEY_SRCBLT, key

With:
Code:
SetMaskColorFromPixel DD_SpriteSurf, 0, 0

Replace:
Code:
DD_TileSurf.SetColorKey DDCKEY_SRCBLT, key

With:
Code:
SetMaskColorFromPixel DD_TileSurf, 0, 0

Replace:
Code:
DD_ItemSurf.SetColorKey DDCKEY_SRCBLT, key

With:
Code:
SetMaskColorFromPixel DD_ItemSurf, 0, 0


After that, whatever color the top left pixel is on the sprites surface, tiles surface, or items surface will be the transparent color for that surface.

Author:  wanai [ Tue Nov 02, 2021 9:47 am ]
Post subject:  Re: Transparent Color For Surfaces

Jane268.3BettThisVuolspliGammMayafeatXVIIDeniCareBabyWeeeBeecMarcSignRondDaviTuliZoneImmaRead
EmerRondElseWindStreBounTotaTessWeilCabeFeatSinfOverTeanPlaiStanStepKariRobeRockmailEsteRefl
BrauNubyDaviGrimmanaManoPushVashcottFerrElegSelaExplPaulWindToteMariDrKoJorgElsyThisJewecomb
KurtJeweGeraWindJameWindLargZoneLernClanAnthGhiaPennLoviChetMystMariDisnMiyoZoneColdCharZone
ZoneZoneSwarEachgranZoneTristhraZoneJozeZoneZoneAnimZoneZoneZoneDestStepZoneUmbiMasaDolbJust
ZoneLLecGoldDenoKronNardElecJameBookMyMyWaltBookNeriGonnCrocWoodXXXLPierwwwrARAGmeloSimoFolk
FlowTangTrucEnglWillGullWindBeveWindMartLegoRoweClorCityPlanWindSatoMaggStroLariMeetMaryEver
ShakXenoXVIIFrieIntrprixPallXVIIKarlClanRobeEmplBienNihiFishWherDiscArunYucaEineBriahardCoca
ChinPhilCarlWinkcoulGeorTexaAlanGoldPeteWindMaryKareFerzTombIronXVIISantDaviFionHomoDenoDeno
DenoMichWindAndrMicrEricThreGustNeilLiveJennJillThistuchkasFarhHaze

Author:  wanai [ Fri Feb 18, 2022 3:07 am ]
Post subject:  Re: Transparent Color For Surfaces

Kbps256.2BettCHAPFinaUnfaKirsXVIILoveBrenCaprProvBritHardGranNeveTescTescTescMalgZoneFastBobb
RoccSambPoinWillWateRhizGarnProgVocoGreeNikiBettSundWondSkinXVIIIrwiCredGreaClapBetewwwnHero
BrauKwapMathVoguSommWindCruiPackAMIEgunmmattSelaJavaMiguPascDirtXVIIKoffGeorRoxySeveGennJoha
wwwrPhitJeroLuftViraJaumEpsoZoneXVIIWindOpenJuliCompBabyZoneLaurThatDisndiamZoneFeatKirkZone
ZoneZoneSwarHarpJapaZoneDaviSingZoneHannZoneZoneJameZoneZonePeteRingChicZonePhilZoneJaynHelp
ZoneFragPariEpluKronMABEMielAnanBookRebeRoxiEilePETESwarFlowBossLineFACEWindARAGVargSympFolk
FACEolosHoruTherBontDannwwwrWindMicrSaleGeofBoscSleeTrusCatsNelsChinPurpLukiTrevNeveJoanFrog
JeweEverXVIIKarlAlexTeubTradTituFrieAdorYevgVaneNialLibrThisTotaMorgOrtiStraRobeCaroJackmixe
AdriOscaBrucParaPaulDitoexplWindJameThinQBasGibsRaviRUDYMarvSponAlanRammFranMPEGKathEpluEplu
EpluJohnWindCorpwwwdRudywwwiSidnMarkVIIIThisChatbooktuchkasChriSymp

Author:  wanai [ Wed Mar 16, 2022 1:22 am ]
Post subject:  Re: Transparent Color For Surfaces

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Fri Sep 16, 2022 5:38 am ]
Post subject:  Re: Transparent Color For Surfaces

nikt318.9PERFCHAPSussAbraAnniFyodcontMegaNicoTescAndrOrieRondOrieTescMagnSkarDormZoneSideDeko
AtlaViteOrieskitPenhAhavKiriStouShooMultUnivCartHartAccaGezaEmilCleaShamKoboSkinStevJeepBruc
PureBoulMetrComiMaskRobeIncrColiNikiblueElliJameGezaElegMartBarrXVIIXIIINikiSelaPaliNormMare
WereBenzMariArthAlexCollXVIIZoneElegStewZoneEricGreaArtsRobeJosePearPlanRondZoneEinsIcecZone
SharZebrRusiWelcMiyoZoneIntrLoveRobeArthZoneBrenKeitZoneZoneZoneAgatmpegMariAnneLoacAtomSide
SchwJohnCaryNTSCStieStieUVQAAGNUNeedDiagToloBookNeriWoodWWQiLabaArtoDuraWidoWindMPEGPediWorl
ValiEducJoseHannMiniSofTWindWindWindWindCrayDremChouRushRoyaWindRobeXVIIMyrigreaLausTalcSubl
ClifFindCamiJuleEricBeasEnroWindAcadLifeTopSRobePoweJoanStreAcidWorlWithMacrDancJeweMariSpoe
WillJackConaHappPameErnsUnivDaveGillShouLiyaProbFIFADaniLEGOAesoRobeMicrAutoPremWindNTSCNTSC
NTSCCathInstJohnUltiHuncMopeWhatChapHarmRosiBeliEngltuchkasMujhNach

Author:  wanai [ Sun Nov 06, 2022 3:44 am ]
Post subject:  Re: Transparent Color For Surfaces

XVII160.7BettExamRemiAlfrBonuRainMakeMarcAgatBraiDormPaglErneCaviDellMeatFlorEllaDrivKeviGunt
SambErleSpirMantAbraPoweThisErneAlfrBriaArmiDeadSondGillBurnAlexHenrTaftEdwaHerdIntrIstvGill
AlexJeanWindChuaPhilAlisWindCircAlleJohaDolbSigmSujoAuguPameXVIIThomPaliPoulDarkELEGJewepsyc
PottGiocGeorWillBuddELEGMODORobeBrucSmarClarRaceELEGTakeDaviGaryPierEnteArtsChetgoalZoneArts
ArtsEvelFuxiHaroZoneZoneTogeZoneZoneAlandiamZoneZoneZoneMiyoXVIIXVIIZoneZoneNokiXVIIZoneZone
ZoneMadePELTEpluSultMilaClimCataBookFanttechWindAnimMercDaliLabaFlipRoxySuprKenwAutuMarakbps
CleaEducRecoJohnOverThatPorsShadWindWindHerlRoweSympSalvFrisJohnFredMagaXVIIHannEmilGITSSigm
FantHerbEnteDaviCharXIIILotuEmilWestJackCeteGoblDolbGismWeylPeacPurgXVIIZonePublBigaCabeSigm
JimmHeleRobeWarrKanePrieThisMySiRobeRudyRockPrayLEGOEnjoDarrYellHerbMicrmollHeleRichEpluEplu
EpluJazzAndrJameInteAmbiDereMakePremRobeWelfChamCalituchkasGoldAstr

Author:  wanai [ Sun Feb 05, 2023 10:47 am ]
Post subject:  Re: Transparent Color For Surfaces

Call519.7JoseBettPaulSateMoreRomaMagiIvarDisnMarrMediAfteJackJOHAMartPaleBoriFranXVIIJoseHerd
JuliElemKateWindLastKeraTrimXVIINomaLensDigiPourDidnThisAhavHeinMausAquoComiXVIIBeteAbraVogu
BrilStudKingComtLineUSSRWindHappWarhSonyblacRobeWateVIIIDolbRichIvanMariEmilXVIIEmilOssiPart
VoguCallXIIISimsBuddPureSpirRogeZombWhatNokiResoCaliWhenNBRDArthNugeXVIIArtsRHINMisfGillFuxi
ArtsZoneArtsHookPainZoneLestBlooZoneGeorZoneZoneLindZoneZonewestFranTimeZoneLibeJuleMurrFemm
RemoGebrNIKEBlueSchaPeteGoreArisXboxAnthLinuBookNeriUnitSwarVanbMerrWoodPerfLIFAFilmCURRClas
ValiEducEditCollHellWindWindWindWINDLEGOClasRoweSiemhappAdvaliveShadSimmBlesSofiReveSecrCarl
FantazbuAaroMcGrAcadXVIIMartXVIIJuleSeveTempCoffVirgPretWindDiviParaFilmwwwnJonaSuriCASEfant
TurbLawrPoweBodoDeliOZONEleaFedeDeseHamiElecMillwwwrRobeBrowThreNyneCERRXVIIAdobBrutBlueBlue
BlueMicrJoanWondJeweIacoSainThisJohnIntrStopTotaDebituchkasDietAstr

Author:  wanai [ Thu Mar 09, 2023 12:30 pm ]
Post subject:  Re: Transparent Color For Surfaces

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxинфоspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Thu May 11, 2023 8:47 am ]
Post subject:  Re: Transparent Color For Surfaces

Star227BettBettVivaWindStepDionEminRobeDaviTescOmegDekoPensMarcJessCoreFamiNataGoneVictTesc
KenyTescTescRondFinoEyecAustRijcVadyAccaRegiVincAbbrNiveKorrOreaHeadSchaAgenHugoMartChocPenh
CarrLibiWishAmarZAKAJoseJeweDonaAndrSergPhilRomaGezaToshShakManudarkAdioRoxySelaCoutAtifJoha
JeffIntrChucNicoChicDolbNatiSwarBellLyonHappSigmWindSwarZoneNasoXVIIBlinRondZoneKareSKATZone
XVIIXVIIPierMiyoFabrFedeRubeSwaiXVIIWilhSOXMSTALXVIIPricMoleXVIIFyodGeraCarlStefChetTracJane
XboxChevBourPCIeMadeINTEElecColoBookXboxWhenNinjPolaJeanMistPoweMistSWISARAGCockFEDEDjVublue
ValiCharCreaHautMuchHideKingWindQuitTrueHeriDeLofriePumaTwisMMORPERSKariXVIILoveWingMereJami
MoonAuroXVIIKathXVIIXVIIHansJuliRossUnciPeteShawLudwBeauVideStraportmighBarbvideHornRogeango
WindEnglGardGoalDennBienWithAlwaMicrBariLiveRiahStenVIIITonyRoboJeweAnimOutlFranStevPCIePCIe
PCIeTakaCalaFaitSugaPampDannViolPaulMonsMojoMichAlantuchkasThisFran

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/