Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 8:40 am

All times are UTC




Post new topic Reply to topic  [ 484 posts ]  Go to page 1, 2, 3, 4, 5 ... 20  Next
Author Message
 Post subject: Blt to another window
PostPosted: Tue Jan 23, 2007 7:02 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
Ok, for my game, Monster Trainer, I'm changing from using picboxes to blting the monsters in the battle window... I've hit a snag... that I don't know how exactly to blt to another form's picbox haha

Could anyone give me any pointers?

I'm not very good with bitblt, if you didn't guess haha.

Cheers.

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 23, 2007 8:58 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Have fun having 2 backbuffers.

Become a real man and only use one form.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 23, 2007 9:51 pm 
Offline
Pro

Joined: Mon May 29, 2006 1:40 pm
Posts: 430
You can use blttohdc from a surface. Or create a new clip like what MS does for the main pic box.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 23, 2007 10:10 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Won't that blt the same thing?

He wants to blt two different things.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 23, 2007 11:36 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
my problem is i have a battle window already set up, i can't be arsed transfering it to mirage.frm 'cos it wouldn't look right

i'll try blttohdc... cheers for the replies :)

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 24, 2007 1:31 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
Ok, i'm really confused now haha, right.. so i'm using Bitblt to do it with, i'm using the following code:
Code:
Call BitBlt(frmBattleWindow.picScreen.hdc, M1X, M1Y, 127, 127, frmGFX.picMonsters.hdc, 0, 0, vbSrcCopy)


but this happens:
Image

it like... draws the map below...

anyone have any ideas? :S

Edit: sorted that

Now I have come accross the problem of that bitblt won't let me have black transparent... I need a specific colour to be transparent... can someone please give me pointers to a way I can blt stuff into a picbox... even if i need to make 2 backbuffers and stuff and make 1 backbuffer for the main game window, and the 2nd for the battle window

i hate blting lol

cheers :)

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 24, 2007 2:37 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
ok, this may help, here's the code I've used up to now (except the dims, saving time):

InitDirectX
Code:
Sub InitDirectX()

    ' Initialize direct draw
    Set DD = DX.DirectDrawCreate("")
    Set DD2 = DX.DirectDrawCreate("")
    frmMirage.Show
   
    ' Indicate windows mode application
    Call DD.SetCooperativeLevel(frmMirage.hWnd, DDSCL_NORMAL)
    Call DD2.SetCooperativeLevel(frmBattleWindow.hWnd, DDSCL_NORMAL)
   
    ' Init type and get the primary surface
    DDSD_Primary.lFlags = DDSD_CAPS
    DDSD_Primary.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE
    Set DD_PrimarySurf = DD.CreateSurface(DDSD_Primary)
   
    'Monster One
    DDSD2_Primary.lFlags = DDSD_CAPS
    DDSD2_Primary.ddsCaps.lCaps = DDSCAPS_PRIMARYSURFACE
    Set DD2_PrimarySurf = DD2.CreateSurface(DDSD2_Primary)
   
    ' Create the clipper
    Set DD_Clip = DD.CreateClipper(0)
    Set DD2_Clip = DD2.CreateClipper(0)
   
    ' Associate the picture hwnd with the clipper
    DD_Clip.SetHWnd frmMirage.picScreen.hWnd
    DD2_Clip.SetHWnd frmBattleWindow.picScreen.hWnd
       
    ' Have the blits to the screen clipped to the picture box
    DD_PrimarySurf.SetClipper DD_Clip
    DD2_PrimarySurf.SetClipper DD2_Clip
       
    ' Initialize all surfaces
    Call InitSurfaces
    Call InitSurfaces2
End Sub



Initsurfaces2
Code:
Sub InitSurfaces2()
Dim Key As DDCOLORKEY
    If FileExist("/GFX/monsters/monsters.bmp") = False Then
        Call MsgBox("Your Monster graphics are not available, please download the game again.", vbCritical, "Graphics Error!")
        Call GameDestroy
    End If
   
    Key.low = 0
    Key.high = 0
   
    ' Initialize MONSTER back buffer
    DDSD2_BackBuffer.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH
    DDSD2_BackBuffer.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_SYSTEMMEMORY
    DDSD2_BackBuffer.lWidth = frmbattlewindow.picscreen.width
    DDSD2_BackBuffer.lHeight = frmbattlewindow.picscreen.height
    Set DD2_BackBuffer = DD2.CreateSurface(DDSD2_BackBuffer)
   
    ' Init Monsters ddsd type and load the bitmap
    DDSD2_MONSTERS.lFlags = DDSD_CAPS
    DDSD2_MONSTERS.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_SYSTEMMEMORY
    Set DD2_MONSTERSsurf = DD2.CreateSurfaceFromFile(App.Path & "\GFX\monsters\monsters.bmp", DDSD2_MONSTERS)
    DD2_MONSTERSsurf.SetColorKey DDCKEY_SRCBLT, Key

End Sub


Now the jumbled up bit, a sub that's called when battle window is open, containing these things:
Code:

        'Rec Place
        rec2.top = 0
        rec2.Bottom = 127
        rec2.Left = 0
        rec2.Right = 127
       
    M1X = 100
    M1Y = 100
    Call DD2_BackBuffer.BltFast(M1X, M1Y, DD2_MONSTERSsurf, rec2, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

TexthDC = DD2_BackBuffer.GetDC
        rec2.top = 0
        rec2.Bottom = rec2.top + frmBattleWindow.picScreen.Height
        rec2.Left = 0
        rec2.Right = rec2.Right + frmBattleWindow.picScreen.Width
        ' Release DC
        Call DD2_BackBuffer.ReleaseDC(TexthDC)
               
        ' Get the rect to blit to
        Call DX2.GetWindowRect(frmBattleWindow.picScreen.hWnd, rec_pos2)
        rec_pos2.Bottom = rec_pos2.top + frmBattleWindow.picScreen.Height
        rec_pos2.Right = rec_pos2.Left + frmBattleWindow.picScreen.Width
       
        ' Blit the backbuffer
        Call DD2_PrimarySurf.Blt(rec_pos2, DD2_BackBuffer, rec2, DDBLT_WAIT)



Anyone see any problems? :S[/code]

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 01, 2007 9:10 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
I still ain't got this to work, but in all honesty I haven't had much time, essay due in tomorrow and had 2 tests this week... been really busy

can anyone give me any pointers? cheers

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 04, 2007 6:21 pm 
Offline
Knowledgeable

Joined: Thu Jun 15, 2006 8:20 pm
Posts: 158
I've had a thought... would there be a way to use the bitblt sub to draw it but WITH transparent black?

I don't know much about bitblt so I can't really say I know how to, could anyone please give me some pointers?

_________________
Fallen Phoenix Online:
An online game world based on the Harry Potter books
www.fallenphoenix.org


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 1:44 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Tue Feb 01, 2022 7:29 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
part279.7CHAPCHAPBillHenrRobeFranDanyBrenThomTescLuciSempMichDomiOmegpottMetaUnitZoneJeweRond
GarlPeteCuisCurvSilvEdwaDomaSomeraggHugoNephViagHopkPerfAccaOreaDoveNiveWolfFredlinePantAnat
WynoXVIIPushSonaMutaJoacLycrSonaWojcMicrElizAdioBrasVentCircSelaLighwwweElegmattGaviRichJoli
AlleFredVentNikiElegOsirDalyRondSpliELEGSwarZonePaliHansDuffNasoZoneKingZoneRusiLeigZoneTade
GordZoneZafiZoneJeweZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneAlfrZonediamZoneZoneHaroZoneZone
ZoneJonaMarqKOSSpachNardMabeFrosWaltCotoKRATMyMyGlamJeffWengSponVinuSTARSeinCERAFilmDjVuBlue
CleaBrigqTreCollZongCarsBabyWoulPoweMistGiotValeViteChouEukaFantJordReveWindhorrAgatCeleDwig
DesaClayMickWillHeinAcadCorpWaltSerpCraiMichIDEFSorrOasiTuskCamaVasiPhilKathWorlJoshMichXVII
WindMastfashEnglOichOrbiexplErikPhilFranMeattitlYounGonnQuikSpenAndyCombEricSusadateKOSSKOSS
KOSSMaryOZONBuddwwwnCrasEmilEasyRobeMissChriEnglRobetuchkasDharChoc


Top
 Profile  
 
PostPosted: Tue Mar 01, 2022 8:07 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruинфоhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruhttp://semiasphalticflux.ruhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.ruhttp://taskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruhttp://temperateclimate.ruhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:06 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Vass


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:07 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
293.5


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:08 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Duke


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:09 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Repr


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:11 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Sanz


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:12 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Mika


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:13 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Pons


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:14 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Mich


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:15 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Rajn


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:16 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Bert


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:17 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Harr


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:18 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Zyli


Top
 Profile  
 
PostPosted: Fri May 13, 2022 8:19 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456108
Sidn


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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