(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-29-24 02:39 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - BitBltting Woes - VB
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Kyoufu Kawa
Posts: 877/1353
I still don't believe you
interdpth
Posts: 198/362
The problem was I didn't set the scale to pixels.
Kyoufu Kawa
Posts: 848/1353
Notice how the block is blitted on a grid boundary. Twips are so small, it wouldn't be aligned.

I see your problem. Swap X and Y. Notice how there's a straight diagonal?

Edit: BitBlt picMap.hdc, mx, my, 16, 16, PicTSA.hdc, Thistile.X, Thistile.Y, &HCC0020

OMAKE!
A twip is 1/20 of a printer’s point (1,440 twips equal one inch, and 567 twips equal one centimeter). These measurements designate the size an object will be when printed. Actual physical distances on the screen vary according to the monitor size."
HyperHacker
Posts: 2330/5072
Lemme guess, you had the picturebox's scale set to Twips (whatever the hell those are) instead of Pixels?

Well as long as this thread is here, the editor looks nice. Those big "load room" and "save room" buttons and the space above them is kinda wasteful though. You could put those in the File menu and move the Room # and Map boxes up a lot.
interdpth
Posts: 195/362
Edit:Just go ahead and delete this. I fixed it

Ok, so my editor is going fine, now I try to implent Level Editing. I got a viewer down but bitbltting is just not working. The tile is always off by some or alot depending on how far I go, someone please help. Here's the code and below that is an image what is happening.

Any questions Feel free to ask.


Private Sub picMap_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim mx As Integer
Dim my As Integer
mx = (X \ 16)' get pos
my = (Y \ 16)'get pos

shpThisMap.Move mx * 16, my * 16 'Keeps track on which tile your over

If Button = 1 Then
BitBlt picMap.hdc, my, mx, 16, 16, PicTSA.hdc, Thistile.X, Thistile.Y, &HCC0020' the hex is denotes SRCCOPY, PicTSA is where the tile is grabbed from this works just not the blitting to picmap that doesn't.
End If
picMap.Refresh
End Sub

And here's the example.
Edit: As the tile that was blitted is the speed block the < shaped one Yeah so don't get confused.
Acmlm's Board - I3 Archive - Programming - BitBltting Woes - VB


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.011 seconds; used 349.48 kB (max 385.41 kB)