Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 9:01 pm

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1334 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 54  Next
Author Message
PostPosted: Tue Apr 14, 2009 1:20 am 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
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.

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Tue Apr 14, 2009 1:26 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
How would i init the surface ?

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
PostPosted: Tue Apr 14, 2009 3:12 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Mon Jun 01, 2009 5:57 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
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.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Sat Sep 05, 2009 2:17 am 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
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?


Top
 Profile  
 
PostPosted: Sat Sep 05, 2009 11:50 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 8:31 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
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


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 8:54 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 8:55 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
77.4


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 8:56 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 8:57 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 8:58 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Erle


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 8:59 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Dune


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:01 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
feat


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:02 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Thom


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:03 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Hans


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:04 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Snoo


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:05 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Thes


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:06 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
YORK


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:07 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Tesc


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:08 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Duns


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:10 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Clas


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:11 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Blac


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:12 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Ever


Top
 Profile  
 
PostPosted: Sat Jan 01, 2022 9:13 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Dorm


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1334 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 54  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group