Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 4:49 pm

All times are UTC




Post new topic Reply to topic  [ 1157 posts ]  Go to page 1, 2, 3, 4, 5 ... 47  Next
Author Message
PostPosted: Sun Sep 06, 2009 1:10 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
How can i change the default sprite template in vb6? from ms4 format to rpgmaker format but in the same way as they are now in separate files

Like File 1
Sprite1.bmp (or something)
Image

File 2
Sprite2.bmp (Instead of 1 Sprites.bmp)
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 1:28 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Image

Image

Code:
Public Sub DrawSprite(ByVal X As Long, ByVal Y As Long, ByVal Dir As Byte)
Dim srcRECT As DxVBLibA.RECT

    With CDX8
        .SetTexture TextureID.sprite1
        Select Case Dir
            Case 1 'Up
                srcRECT.Top = 96 '0
            Case 2 'Down
                srcRECT.Top = 0 '96
            Case 3 'Left
                srcRECT.Top = 32
            Case 4 'Right
                srcRECT.Top = 64
        End Select
       
        srcRECT.Left = 33
        srcRECT.Right = srcRECT.Left + 32
        srcRECT.bottom = srcRECT.Top + 32
           
        .TextureControl X * 4, Y * 4, srcRECT.Right - srcRECT.Left, srcRECT.bottom - srcRECT.Top, srcRECT.Left, srcRECT.Top, , False
        .Draw
    End With
End Sub


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 1:39 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
Where would i put this i tried to find it but there is none...


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 1:56 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
bluedude13 wrote:
Where would i put this i tried to find it but there is none...


It's just an example, you'll need to edit BltPlayer to do it yourself.

_________________
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: Sun Sep 06, 2009 2: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
Yeah it's really simple.

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 2:27 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
Ahh man i tried but i get lots of errors can some one help?


Code:
Public Sub BltPlayer(ByVal Index As Long)
Dim Anim As Long
Dim I As Long
Dim SpellNum As Long
Dim X As Long
Dim Y As Long
Dim Sprite As Long
Dim rec As DXVBLib.RECT

    Sprite = GetPlayerSprite(Index)

    ' Check for animation
    Anim = 0
    If Player(Index).Attacking = 0 Then
        Select Case GetPlayerDir(Index)
            Case DIR_UP
                If (Player(Index).YOffset < SIZE_Y / 96) Then Anim = 1
            Case DIR_DOWN
                If (Player(Index).YOffset < SIZE_Y / 0 * -1) Then Anim = 1
            Case DIR_LEFT
                If (Player(Index).XOffset < SIZE_Y / 32) Then Anim = 1
            Case DIR_RIGHT
                If (Player(Index).XOffset < SIZE_Y / 64 * -1) Then Anim = 1
        End Select
    Else
        If Player(Index).AttackTimer + 500 > GetTickCount Then
            Anim = 2
        End If
    End If
   
    ' Check to see if we want to stop making him attack
    With Player(Index)
        If .AttackTimer + 1000 < GetTickCount Then
            .Attacking = 0
            .AttackTimer = 0
        End If
    End With
   
    With rec
        .Top = 0
        .Bottom = SIZE_Y
        .Left = (GetPlayerDir(Index) * 3 + Anim) * SIZE_X
        .Right = .Left + SIZE_X
    End With
   
    X = GetPlayerX(Index) * SIZE_X + Player(Index).XOffset
    Y = GetPlayerY(Index) * SIZE_Y + Player(Index).YOffset - 4 ' to raise the sprite by 4 pixels
   
    ' Check if its out of bounds because of the offset
    If Y < 0 Then
        Y = 0
        With rec
            .Top = .Top + (Y * -1)
        End With
    End If


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 2:40 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Code:
With rec
        .Top = GetPlayerDir(Index) * SIZE_Y
        .Bottom = .Top + SIZE_Y
        .Left = Anim * SIZE_X
        .Right = .Left + SIZE_X
    End With


That should be it.

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 2:55 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
But now it says ERROR Missing file


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 2:56 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Umm ok that has nothing to do with BltPlayer. How are you loading your sprites?

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 2:59 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
Well i just changed my sprite to Sprite 16 ( the rpg maker sprite format) and then i changed it to 2.bmp or 17.bmp and everytime it says its missing...


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 3:00 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Did you actually place .BMP files in there, or did you put .PNG files in there?

_________________
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: Sun Sep 06, 2009 3:02 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
it was a Bmp why should it be png?


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 3:06 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
The sprites you showed us are PNGs.

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 3:25 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
Hmm wait..


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 3:28 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Open them in paint and save as 24-bit BMPs. And make sure the first sprite file is sprite0 or sprite1 I forgot what it starts at.

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 3:59 am 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
It works now but everything back wards like i tried switching the code around but it didn't work

THis is how its like

|How its supposed to be| |How it is now :(|
left------------------------------------>Right
right---------------------------------->Up
up------------------------------------->Down
Down---------------------------------->Left


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 5:11 am 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Code:
Select Case GetPlayerDir(MyIndex)
        Case DIR_DOWN
            .Top = DIR_LEFT * SIZE_Y
        Case DIR_LEFT
            .Top = DIR_DOWN * SIZE_Y
        Case DIR_RIGHT
            .Top = DIR_UP * SIZE_Y
        Case Dir_UP
            .Top = DIR_RIGHT * SIZE_Y
    End Select
   
    With rec
        .Bottom = .Top + SIZE_Y
        .Left = Anim * SIZE_X
        .Right = .Left + SIZE_X
    End With

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

Image
Image


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 1:08 pm 
Offline
Regular

Joined: Wed Sep 02, 2009 8:13 pm
Posts: 29
Aww i cant do it :( i keep getting so many errors and i cannot find the GetplayerDir your talking about all you do is paste the code!
Sorry.


Top
 Profile  
 
PostPosted: Sun Sep 06, 2009 4:31 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Oops just change MyIndex to Index there...

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

Image
Image


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 11:37 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
PostPosted: Wed Jan 19, 2022 11:54 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Jan 19, 2022 11:55 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Jan 19, 2022 11:56 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Jan 19, 2022 11:57 am 
Offline
Mirage Source Lover

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


Top
 Profile  
 
PostPosted: Wed Jan 19, 2022 11:58 am 
Offline
Mirage Source Lover

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


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

All times are UTC


Who is online

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