Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 1:02 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 7:24 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Okay so I'm working on a way old source, dicking around. I made a /rest feature, where when you're resting you regen twice as much MP and HP, however you cannot move whatsoever or attack or cast spells, and you take twice the damage when you're resting. However now I need to get it to where an icon is drawn over the players character when they're resting.

I have this in the gameloop

Code:
                If IsPlaying(I) Then
                    If GetPlayerMap(I) = GetPlayerMap(MyIndex) Then
                        If Player(I).IsResting = True Then
                            BltRestIcon I
                        End If
                    End If
                End If


Now I just need to know what to put in

Code:
Sub BltRestIcon()
               
               
End Sub


I've looked at the other drawing and whatnot, but it seemed to different to really help me out.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 7:34 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Easy stuff, yo.

Code:
Private Sub BltRestIcon(ByVal Index As Long)
Dim rec As DXVBLib.RECT

    With rec
        .Top = 0
        .Bottom = 32
        .Left = 0
        .Right = 32
    End With
   
    Call DD_BltFast(GetPlayerX(Index) * 32, (GetPlayerY(Index) * 32) - 32, DDS_RestIcon, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
   
End Sub


Then call this somewhere:

Code:
Call InitDDSurf("resticon", DDS_RestIcon)


And make sure you have a resticon.bmp.

The rec defines the size of the image...for example the rec I have set up does a 32x32 selection from the resticon.bmp at 0,0 (very top left).

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

Image
Image


Last edited by GIAKEN on Mon Jun 15, 2009 7:39 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 7:35 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 09, 2007 3:16 am
Posts: 276
Can't you just rip the emotion bubble code and change it around so they don't disappear? That's how I'd do it anyway.

_________________
Image
Island of Lost Souls wrote:
Dr. Moreau: Mr. Parker, do you know what it means to feel like God?


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 7:39 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
There isn't emoticon code in MS4.

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

Image
Image


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 8:12 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
I was using an Old ED source though. However you both helped me immensely, thanks. :) Both examples helped me get it.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 8:14 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
OH YEAH I forgot it's for HO which is old ED...alright my bad :D

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

Image
Image


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 8:20 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Here's what I have:

Code:
Private Sub BltRestIcon(ByVal Index As Long)
    Dim rec As DXVBLib.RECT
    Dim X2 As Long
    Dim Y2 As Long
    X2 = NewX + sx + 0

    If GetPlayerGuild(Index) <> vbNullString Then
        Y2 = NewY + sx - 42
    Else
        Y2 = NewY + sx - 30
    End If

    With rec
        .Top = 0
        .Bottom = 32
        .Left = 0
        .Right = 32
    End With
   
    Call DD_BackBuffer.BltFast(X2, Y2, DD_RestIcon, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
   
End Sub


Does this look good? Seems to display right for me, but will it display right for everyone?

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Mon Jun 15, 2009 9:58 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Need to use GetPlayerX and Y in there...look at other code like spells or something.

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

Image
Image


Top
 Profile  
 
 Post subject: Re: Blitting Stuff...
PostPosted: Tue Jun 16, 2009 3:41 am 
Offline
Persistant Poster
User avatar

Joined: Thu Jul 24, 2008 6:42 am
Posts: 703
Google Talk: infectiousbyte@gmail.com
Yeah, I got it fixed. :)

<3 you guys.

_________________
Image
GIAKEN wrote:
Since I'm into men, not women

GIAKEN wrote:
I can't take these huge penises anymore! All that's left is shame! And blood


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

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