Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trekn-mixer 0.2
#6
(12-06-2022, 12:26 AM)mnrvovrfc Wrote: I'm having some problems with the weapon rotation... JDJ you made them 32 pixels across instead of 64 which is one thing. I thought it was easy to program but might have to settle for plain flipping horizontally and vertically with "_PUTIMAGE". The "objects" shown on this thread might have to be fit into the concept of my "dream".

Another thing is that I discovered "_CLIPBOARDIMAGE" doesn't work on Linux (which is intentional) so cannot paste into GIMP and have to work strictly with BMP screenshots manipulated by BASIC programs.


You could do triangle mapping for rotating the sprites. Did you track down RotoZoom ?  That works well.   
Not my subprogram and not sure if it's the best version:
Code: (Select All)
Sub RotoZoom2 (centerX As Long, centerY As Long, Image As Long, xScale As Single, yScale As Single, Rotation As Single)
    Dim px(3) As Single: Dim py(3) As Single
    W& = _Width(Image&): H& = _Height(Image&)
    px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
    px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
    sinr! = Sin(-Rotation): cosr! = Cos(-Rotation)
    For i& = 0 To 3
        x2& = (px(i&) * cosr! + sinr! * py(i&)) * xScale + centerX: y2& = (py(i&) * cosr! - px(i&) * sinr!) * yScale + centerY
        px(i&) = x2&: py(i&) = y2&
    Next
    _MapTriangle (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
    _MapTriangle (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
End Sub





As for saving the screen image have you tried using the saveimage example from the wiki?  SAVEIMAGE - QB64 Phoenix Edition Wiki I use the clipboard myself because I usually have a paint app open and just paste a generated image into that.
Reply


Messages In This Thread
Trekn-mixer 0.2 - by James D Jarvis - 12-05-2022, 01:03 AM
RE: Trekn-mixer 0.2 - by James D Jarvis - 12-05-2022, 09:03 PM
RE: Trekn-mixer 0.2 - by bplus - 12-05-2022, 11:41 PM
RE: Trekn-mixer 0.2 - by Pete - 12-05-2022, 11:56 PM
RE: Trekn-mixer 0.2 - by mnrvovrfc - 12-06-2022, 12:26 AM
RE: Trekn-mixer 0.2 - by James D Jarvis - 12-06-2022, 01:56 AM
RE: Trekn-mixer 0.2 - by mnrvovrfc - 12-08-2022, 01:10 AM
RE: Trekn-mixer 0.2 - by mnrvovrfc - 12-09-2022, 10:13 AM
RE: Trekn-mixer 0.2 - by mnrvovrfc - 12-06-2022, 01:44 PM
RE: Trekn-mixer 0.2 - by James D Jarvis - 12-06-2022, 05:47 PM
RE: Trekn-mixer 0.2 - by CharlieJV - 12-10-2022, 03:32 AM
RE: Trekn-mixer 0.2 - by James D Jarvis - 07-20-2023, 01:28 PM
RE: Trekn-mixer 0.2 - by johnno56 - 07-20-2023, 08:37 PM
RE: Trekn-mixer 0.2 - by James D Jarvis - 07-20-2023, 10:17 PM
RE: Trekn-mixer 0.2 - by johnno56 - 07-21-2023, 02:48 AM
RE: Trekn-mixer 0.2 - by James D Jarvis - 07-21-2023, 03:53 AM



Users browsing this thread: 15 Guest(s)