(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-14-24 06:10 PM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - BitBltting Woes - VB New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
interdpth

Mole
MZM rapist


 





Since: 11-18-05

Last post: 6294 days
Last view: 6294 days
Posted on 06-23-06 01:01 AM Link | Quote
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.



(edited by interdpth on 06-23-06 12:36 AM)
(edited by interdpth on 06-23-06 12:49 AM)
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6295 days
Last view: 6295 days
Posted on 06-23-06 02:28 AM Link | Quote
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.
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6294 days
Last view: 6294 days
Posted on 06-23-06 10:36 AM Link | Quote
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."


(edited by Kyoufu Kawa on 06-23-06 09:38 AM)
interdpth

Mole
MZM rapist


 





Since: 11-18-05

Last post: 6294 days
Last view: 6294 days
Posted on 06-25-06 04:15 AM Link | Quote
The problem was I didn't set the scale to pixels.
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6294 days
Last view: 6294 days
Posted on 06-26-06 05:44 AM Link | Quote
I still don't believe you
Add to favorites | Next newer thread | Next older thread
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.009 seconds; used 367.58 kB (max 441.82 kB)