Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blitting Vis Inv?
#1
Well I need advice on blitting vis inv to the screen. Guidance basically.
Reply
#2
for visual inv or to get it on screen?
Reply
#3
Read carefully, friend.

Quote:vis inv to the screen
Reply
#4
Fine then I wont help
Reply
#5
Doesn't matter to me :] Sooner or later I'll grasp my needs concerning none of your help.
Reply
#6
Pando Wrote:Doesn't matter to me :] Sooner or later I'll grasp my needs concerning none of your help.


wtf is going on here guys? are you doing that because you are friends or dont you like each other?..anyway



so, the current code tells the vis inv to blit into the differnt icon boxes, you need to make a variable so that it checks how many items there are in the inventroy so blit it lets say 10 pixels away and then 32x32 pixels...then you need to change the blitting code to do that, i guess thats basicly it

add me in msn if you need help with that ^^
Reply
#7
Nvm. This isn't what I actually needed to know. But I thought about it and Kite told me a way he did it. Yes Kite
Reply
#8
[quote="Pando"]Nvm. This isn't what I actually needed to know. But I thought about it and Kite told me a way he did it. Yes Kiteblitting vis inv to the screen
Reply
#9
Ahh sorry, thanks Gilgamesch :]
Reply
#10
Kuja Wrote:Ahh sorry, thanks Gilgamesch :]


well, its ok ^^
Reply
#11
oh btw. Would I use bitblt in gamelogic?
Reply
#12
Fuck you. Retard ass bitch. Get a life and stop being retarded.
Reply
#13
Kuja Wrote:Fuck you. Retard ass bitch. Get a life and stop being retarded.

ummm who are you even saying this too? lol

Anyways you would want it to blt it out in GameLoop when everything else is being blted Im sure. I would make it the last thing blted.
Reply
#14
halla Wrote:
Kuja Wrote:Fuck you. Retard ass bitch. Get a life and stop being retarded.

ummm who are you even saying this too? lol

Anyways you would want it to blt it out in GameLoop when everything else is being blted Im sure. I would make it the last thing blted.

Obviously he was talking about himself, since that is now the last post Smile

Also, obviously Tongue you would use bltfast and blt things just like everything else is blt if its blting to the screen where the map is, if its blting to a picturebox, you could either use bitblt or use blttohdc with dx.
Reply
#15
Do I sense lack of moderation here?

I didn't know we had so many girls on the forum (Only the smart people will get this joke)
Reply
#16
didn't someone see the guy saying "I EAT SHIT" T___T

with the big o avatar... ? And someone deleted his post making all think I'm name calling myself? okay.
Reply
#17
Kuja Wrote:didn't someone see the guy saying "I EAT SHIT" T___T

with the big o avatar... ? And someone deleted his post making all think I'm name calling myself? okay.

ok...who is it then ??
Reply
#18
Yasin -_________-
Reply
#19
Just do it my way for now.

It's not the greatest, but it works.

It also allows you to expand your Inventory size later on, with only adding one more line of code (or you could optimise the entire thing and have only three lines of code for it!)

This is how I did it here (but with alphablending for the background thingy):

[Image: untitled.jpg]
Reply
#20
What way is that? Oh the way you told me?

Also, tell me whats up with my code. Its buggy and doesn't blit the correct item.

Code:
Sub BltInvItems(ByVal ItemNum As Long)
Dim X As Long, Y As Long, I As Long

    rec.top = Item(ItemNum).Pic * PIC_Y
    rec.Bottom = rec.top + PIC_Y
    rec.Left = 0
    rec.Right = rec.Left + PIC_X
    
    X = 108 - 35
    Y = 78
    'Call DD_BackBuffer.Blt(rec_pos, DD_ItemSurf, rec, DDBLT_WAIT Or DDBLT_KEYSRC)
    Call DD_BackBuffer.BltFast(X + (ItemNum * 35), Y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End Sub

Note ( 35 is used because the spacing in the bitmap file )

Nvm. fixed it, Now for the new embarks!
Reply
#21
Kuja Wrote:didn't someone see the guy saying "I EAT SHIT" T___T

with the big o avatar... ? And someone deleted his post making all think I'm name calling myself? okay.

I didn't, but I figured you were talking to one of the spammers.
I just felt like joking with you Tongue
Reply
#22
I deleted them. I must have missed deleting some of your responses to his posts.
Reply
#23
oi Kite! I tried the thing you told me but didn't work. When I do it, nothing shows. (Items)

Heres my regular code that works, for the first 5 items.
( now blits correct items )

Code:
Sub BltInvItems(ByVal ItemNum As Long)
Dim IX As Long, IY As Long

    rec.top = Item(GetPlayerInvItemNum(MyIndex, ItemNum)).Pic * PIC_Y
    rec.Bottom = rec.top + PIC_Y
    rec.Left = 0
    rec.Right = rec.Left + PIC_X
    
    IX = 108 - 35
    IY = 78
    
    'Call DD_BackBuffer.Blt(rec_pos, DD_ItemSurf, rec, DDBLT_WAIT Or DDBLT_KEYSRC)
    Call DD_BackBuffer.BltFast(IX + (ItemNum * 35), IY, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End Sub

-35 for spacing. etc.

[ e d i t ] Thanks to sensei's help (
Reply
#24
Sorry I didn't reply, I've haven't been online for a few days.

Dave, I get 3-5fps using normal Mirage on the PC I took the screenshot on. There is a 2-6 fps drop when the lighting comes on.

Also, that is a very old engine I used, and it could be done a lot better!

Kuja, did you manage to get it to work?
Reply
#25
Yeah, It works properly. The fps isn't too slow. I've also got alpha blending with sprites and it seems to get faster when in alpha blending mode 0.o The fps doesn't drop for sprites though :p
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)