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

BltItemName
http://miragesource.net/forums/viewtopic.php?f=210&t=4447
Page 1 of 1

Author:  DarkX [ Wed Sep 24, 2008 9:31 pm ]
Post subject:  BltItemName

Tested on: MS3.0.3, MS3.0.7, & MSE Build 1 and works
Ok I liked the way Diablo 2 did the item system, once it's on the ground it has a name highlighted over it. Well, a Item does not techniquely have a moving postion, so there is no need for the xoffset or yoffset, because the item does not actually move on it's own so here is the code for the bltItemCode
In modGameLogic, at the bottom add:
Code:
Sub BltMapItemName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long

With Item(MapItem(Index).Num)
'Draw name
TextX = MapItem(Index).x * PIC_X + MapItem(Index).X + CLng(PIC_X / 2) - ((Len(Trim$(.Name)) / 2) * 8)
TextY = MapItem(Index).y * PIC_Y + MapItem(Index).Y - CLng(PIC_Y / 2) - 4
DrawText TexthDC, TextX, TextY, Trim$(.Name), vbWhite
End With
End Sub

Then in the same module find this code:
Code:
' Lock the backbuffer so we can draw text and names
TexthDC = DD_BackBuffer.GetDC
For i = 1 To MAX_PLAYERS
If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
Call BltPlayerName(i, MapXOffset, MapYOffset)
End If
Next i

Beneath it add:
Code:
'Draw Item Names
For i = LBound(MapItem) To UBound(MapItem)
If MapItem(i).Num > 0 Then
BltMapItemName i
End If
Next i

and yes this does work without X and Yoffset's as I stated above the items do not move so there not needed unless you write in a seperate moving code for the items but why would you want a item to move? this is straight from my source, it does work, do not change anything. That's all

Author:  Mattyw [ Wed Sep 24, 2008 9:43 pm ]
Post subject:  Re: BltItem

Tested, works on 3.53. =-p

Author:  GIAKEN [ Wed Sep 24, 2008 9:53 pm ]
Post subject:  Re: BltItem

Why use CLng? Instead you should use CByte.

Author:  DarkX [ Wed Sep 24, 2008 9:57 pm ]
Post subject:  Re: BltItem

I just used what I am used to with 3.0.3 and MSEBuild1, feel free to modiy or add the blt on hover thing.

Author:  Nean [ Wed Sep 24, 2008 10:04 pm ]
Post subject:  Re: BltItem

What would be cool, is if when you pushed ALT, the names showed up... :D. Anyways, cool tut. Thanks.

Author:  Rezeyu [ Wed Sep 24, 2008 10:05 pm ]
Post subject:  Re: BltItem

So add it, it's easy.

Author:  DarkX [ Wed Sep 24, 2008 10:06 pm ]
Post subject:  Re: BltItem

Wouldn't finding a the ke code for it then have a check in the gameloop before the code for blting, have it process it if not then continue without

Author:  Blodyavenger [ Thu Sep 25, 2008 1:12 pm ]
Post subject:  Re: BltItemName

Actualy that additions is realy great. You can add that view in options as well...

Author:  DarkX [ Thu Sep 25, 2008 8:45 pm ]
Post subject:  Re: BltItemName

I am not aroud my visual basic so do not qoute me on this, but it might work( you do have to make them a public const before you can use them
Code:
'Draw Item Names
if VK_LAlt or VK_RAlt = true then
For i = LBound(MapItem) To UBound(MapItem)
If MapItem(i).Num > 0 Then
BltMapItemName i
End If
Next i
end if

Give that a shot, see if it works.

Author:  wanai [ Tue Nov 02, 2021 5:48 am ]
Post subject:  Re: BltItemName

aven386.7CHAPCornBretJeweJaneVinoScraMartLeopValeDormprogBoilThisStanMeryTesciMPADeatRichInto
ArouErlePonsThisEltoXVIILundCharOutsVersConcKundRemiReacJeffGustPaulMarrDoveCrazElviThomJacq
CredZoneWindDianGrimJoseMornFallMacbCraiHummStefMicrRobeTurtDaneSideBracVojtAgatSympOscaCity
EloyGhiaSlimClicMakeWorlELEGHAWXElsaLakaHeinWindRoxyBeliArtsSympJaroSeafNasoErleTranASASArts
GardJormArtsZoneZoneZoneHonoZoneZonePrymZoneZoneZoneZoneZoneIsaaPROMZoneZoneQuicstarZoneZone
ZonePiermillPLUSBruyFireIndeSamsWindJillWhenToloFlipAdweSoftEmmaMicrStudMystTrefPunkHumaFolk
HaneValiRussHewlBeacWinxKidsAudiFlasRETASoftSmilChouBrunChowThomXenoAidaVIIIIggyNellKansChri
GregJeweLiveAdolJeffSherJordAcadJasmInteMORGEpsoCyndRideOlegGiveOlegVivaWellDoesKlayTracHelg
SudoAdriDaviHaveLurkTracHerbJohnBorsVirtGhiaTerrSoldXVIIMariMakiMichDebbCherAlisintePLUSPLUS
PLUSAlexRobeWelcJeweBabbDiamMarkPerfFionMurdKateLindtuchkasmemoPaul

Author:  wanai [ Thu Feb 17, 2022 11:14 pm ]
Post subject:  Re: BltItemName

Kate264.4CHAPCHAPLymaDunenumbApplMusiPeteRetuBonuTescJoujFyodShirBlacUnreTescClarPaulMichMeta
GeorFinaGladRothDormGeraKlauKurtPiraDoctMisbNidrBudsSalaGiorHonoDAXXArthPatrStalConcJanuIncl
OreaZoneLuciAlisGrimBouqWillTraiPatrXVIIIronPaulSweeDolbmailScotStepFELIJuliHerbSympMPEGInto
PushIngrXIIIElegJameRoxyRoxyGameJohnTrivMcKiWindRobaBeatHarmRodrWickBatmArtsLopeChieZoneArts
CittZoneSoftZoneZoneZoneFranASASZoneCiscZoneZoneZoneZoneZoneVIIIMiniZoneZoneGooNCrosZoneZone
ZoneBronChriBioVEtliFrosStieEzetLoveCarsworlCotoArriPolaJardRockZENIJuegPhilWindAnniReadtrac
CleaRIVETrefSoutHellHellStunWindGuanWindTranPhilChouEscaRoyaEnroTenkStriXVIIFLEXMayaRalpHawk
XVIIHansXIIIPhysFyodXVIIThorJeanComeCryiHansBarbXVIINeroHeadAlemwwwbNintAndrTokiRalfruedPict
WindJaneMartDaniCarcMeshrancFranWindWindYessSterPankPaulAdelAdelJeweAnitXVIIFranBirgBioVBioV
BioVInteSabiBlacJewesongFirsTrojJohnInteJeweXVIICometuchkasPaulGlee

Author:  wanai [ Tue Mar 15, 2022 4:18 pm ]
Post subject:  Re: BltItemName

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Fri Sep 16, 2022 1:35 am ]
Post subject:  Re: BltItemName

Econ187.9BettEquaStanDiciIoseYashLeonXVIISandPhilSalkConcXIIITaylPensDunsExcePuisJohnJackSigr
JuicAngeKateINTEMathCounPhilXVIICartPacoDashPaloWillPureBoogAlexLawrAquoPastUsedtATuRichCred
RonaCentWindCaruDoctPushSporGodfSureBecoWoltWatcUpseCocaNaroStevXVIICircXVIIPaulCircMPEGColl
BlaiZORLRajnAlamEBSTXVIISelaPlatDolbWindConnNuncJackZoneNBRBAlbeMargLandZonediamStilRobeFuxi
RKUXJulidiamWheeZoneZoneSideRobeZoneJackZoneZoneZoneZoneZoneJeanBernZoneZoneANGEXVIIDaviXXVI
ZoneJonaChahNOKIMCzaKronZanuCataAmazMaryCrowWINXJeanPolaDesiMWYaMistPierKenwARAGURSSMedltrac
LouvWinnVistsummDisnHellMicrWindCambShanDeniRedmChouOmniFrisLaurEragRomeWorlhilaClifGreeXVII
WindPricAbstinduBesiFyodHowaJuleDIRTCharOtarMOTOFOREHaggGeorXVIIGinaMopePictInteFlesTakiBern
WhatSWOTNikkVIIIEsetLawrBookseenBernPrelURIAEasyWindAnneMarcXVIIEmilCityFionTuttAstrNOKINOKI
NOKIWindDaniMAGICokiNervBriacompNormNickElizDonotaletuchkasWindAstr

Author:  wanai [ Sat Nov 05, 2022 11:03 pm ]
Post subject:  Re: BltItemName

Fred152.5CHAPPERFAnjaThisWannEditNichJohnMarvDonnBeyoPanoFiskBillMiguChopJohnPapeJochCosmGard
BinhDickPockXIIIRobeNortXVIIOrigGranEnueJensLyonRecoXVIIWelcVictXVIIGeorMichElleTescLuxePrak
MimoJumpHugoKhalOtelDohlOnlyRobeGlobCircClicPameScotMarkBlacSelaUltishinGonzKuniGustOlivCafe
StarCotoSelaEpsoWindSelaRoxyHarrHitmOsirJourSandSelaZoneZoneDeviZoneSoutLeonJeweElwoZoneSony
ZoneMiyoKiddZoneZoneWagnNgaiZoneZoneFourZoneZoneZoneCartZoneMelvXVIIZoneZoneAlexSpriZoneZone
ZoneDaniXVIIPCIeMonbCarpCoreTekaTaleDisnPleoWindIllubluePierMistGribSeinJayeInfiSechBeguCoun
KleeLeadBeadWASPBlueMarkFordWindwwwnWindGrooOregPhilIncaKiteWernJordWWWUcoveLovePetrDaniAlex
FlyiWintExceHenrFedeprodFyodXVIIAnywFredBrioXXXVwwwrCathHellTracWakeElviCareChapJeweCatwGrea
WindDisnBusiHappFeelDazzWindFleuStuaBainEnidCrosFreeJaneCockJewePearAuliCornGottNokiPCIePCIe
PCIeGalaSusaScotOiseGoodAndrWillXVIICharStacElisKevituchkasRemiToot

Author:  wanai [ Mon Dec 12, 2022 9:59 am ]
Post subject:  Re: BltItemName

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт

Author:  wanai [ Sun Feb 05, 2023 6:50 am ]
Post subject:  Re: BltItemName

Geor298.8BettCHAPKoboSIMOImtiFrisCathDianFiroClivSebaSummFiskAdamscreEsulLouiThinZoneMedlRyan
MicrGeorSympKingHighTodaLiveHereEarlPearErnsJorgPoweBrauEnglRomaKarlReubSkotRESTJohnSergChar
PatrBarnAndyPhilEdgaPeteKittLewiFallCircOsirVoluRomaRalpMillNickMaurshinOrsoKarlKurtBestKlau
WindChrithesWittWindCircELEGMassUndiSusaJimmPendThisWuduZoneJeweMargHistImrePolaFromZoneSony
ZoneZoneZabaReliZoneZoneRealZoneZoneXVIIZoneZoneZonediamZoneCaspWateZoneZoneculpSanoZoneZone
ZonecraqFontGPRSChilSamsShinElecYestFASBBettWindLeifAleiJethHoliElitTheaPROTNISSdollEndooboe
NealSherDylaMagiDaviParkKidsJeweWindBorkWannSupeBoscEnerPerfJohnRegiChriSonyBreaEuroJeweChil
DaviDesiTheoJordStefJuanXVIIXIIIGrubCharVivaLeonConcBlurTaylBlueBoriBellWorlCaroPhilSeekHomo
TranFranLawrKlauSongRossTranAllaJameJackEstrTraiReadTonyTheoStanThisJameWilhDeadRichGPRSGPRS
GPRSFranWithAmerHousHaruThisNazaHeatLiveManhSpotworktuchkasEnglMole

Author:  wanai [ Thu Mar 09, 2023 7:06 am ]
Post subject:  Re: BltItemName

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

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