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

[Feature] Dynamic sprite sizes!
http://www.miragesource.net/forums/viewtopic.php?f=183&t=5047
Page 3 of 63

Author:  Labmonkey [ Tue Apr 14, 2009 1:20 am ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

init the surface before you run the code. Also change all of the ddsd_sprite to dds_sprite.surfdescription. Thats what I did and it worked fine.

Author:  Doomy [ Tue Apr 14, 2009 1:26 am ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

How would i init the surface ?

Author:  GIAKEN [ Tue Apr 14, 2009 3:12 am ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Here's my clipper code (Dugor helped with it a long time ago, makes surfaces not disappear when off screen):

Code:
If Y < 0 Then
        rec.Top = rec.Top - Y
        Y = 0
    End If
   
    If X < 0 Then
        rec.Left = rec.Left - X
        X = 0
    End If
   
    If X + Anim_Size(AnimNum).SizeX > DDSD_BackBuffer.lWidth Then
        rec.Right = rec.Right - (X + Anim_Size(AnimNum).SizeX - DDSD_BackBuffer.lWidth)
    End If
   
    If Y + Anim_Size(AnimNum).SizeY > DDSD_BackBuffer.lHeight Then
        rec.Bottom = rec.Bottom - (Y + Anim_Size(AnimNum).SizeY - DDSD_BackBuffer.lHeight)
    End If


Just change the Anim_Size stuff to whatever the size of the surface is.

Author:  Robin [ Mon Jun 01, 2009 5:57 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Updated to work with the latest MS4.

Basically, the lHeight and lWidth were being stored in the .SurfDescription when the sprite ready-ing code was called, which came after all the calculations were passed. I changed it so this was called before the calculations.

Author:  Kousaten [ Sat Sep 05, 2009 2:17 am ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Using Giaken's clipping code, I'm trying to modify it a bit to work with Advocate/Matt's dynamic maps version of MS4. The X clipping works fine as:

Code:
' Is player's X more than max map values..?
    If X + (DDSD_Sprite(Sprite).lWidth / 12) > MAX_MAPX * 32 + 32 Then
        With rec
            .Right = .Right - ((Map.MaxX / 2) - 24)
        End With
    End If


I know the formula should be similar for the Y clipping, but I can't seem to get it to work properly. Any ideas?

Author:  GIAKEN [ Sat Sep 05, 2009 11:50 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

An easy way to fix clipping problems is to convert map drawing to using Blt instead of BltFast. The way DirectX 7 works is BltFast takes out clipping, resizing, and whatever other things and just simply draws it to the screen, which makes it faster. Clipping code is already set up with like DD_Clipper I think...but it only works with Blt.

Author:  wanai [ Wed Dec 01, 2021 8:31 am ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

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.rumagnetotelluricfield.rumailinghouse.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.ruсайтsemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoningtechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.ruhttp://temperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Sat Jan 01, 2022 8:54 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Econ

Author:  wanai [ Sat Jan 01, 2022 8:55 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

77.4

Author:  wanai [ Sat Jan 01, 2022 8:56 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Bett

Author:  wanai [ Sat Jan 01, 2022 8:57 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Bett

Author:  wanai [ Sat Jan 01, 2022 8:58 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Erle

Author:  wanai [ Sat Jan 01, 2022 8:59 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Dune

Author:  wanai [ Sat Jan 01, 2022 9:01 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

feat

Author:  wanai [ Sat Jan 01, 2022 9:02 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Thom

Author:  wanai [ Sat Jan 01, 2022 9:03 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Hans

Author:  wanai [ Sat Jan 01, 2022 9:04 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Snoo

Author:  wanai [ Sat Jan 01, 2022 9:05 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Thes

Author:  wanai [ Sat Jan 01, 2022 9:06 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

YORK

Author:  wanai [ Sat Jan 01, 2022 9:07 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Tesc

Author:  wanai [ Sat Jan 01, 2022 9:08 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Duns

Author:  wanai [ Sat Jan 01, 2022 9:10 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Clas

Author:  wanai [ Sat Jan 01, 2022 9:11 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Blac

Author:  wanai [ Sat Jan 01, 2022 9:12 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Ever

Author:  wanai [ Sat Jan 01, 2022 9:13 pm ]
Post subject:  Re: [Feature] Dynamic sprite sizes!

Dorm

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