Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mini-weapon mixer
#1
A cousin to the mini-monster-mixer and robot mixer.  Generates 80 weapon sprites for a rpg/rougelike.
here's a sample run:

[Image: image.png]


Code: (Select All)
'Mini-Weapon-Mixer v0.1
'By James D. Jarvis December 2022
'This program uses BASIMAGE coded by Dav for QB64GL 1.4, MAY/2020
'
'generate a sprite sheet of weapons for use in a roguelike/RPG
'each is 64 by 64 pixels but code here can be modified to change that
'
'press c or s to save a sprite sheet to the clipboard so you can paste it into a paint program
'and save is whatever format you desire
'pres <esc> to quit
'
'License: Share sprite sheets as long as they include generated credit bar in image
'any programs using original code or graphics from source or generated by program
' please include the following (or equivalent) line somwhere in comments and documentation:
'Includes Art and/or Code from Mini-Weapon-Mixer v0.1 created by James D. Jarvis
'
Randomize Timer
Dim Shared ms&
ms& = _NewImage(512, 360, 32)
Screen ms&
_Title "Mini-Weapon-Mixer V0.1"
Dim Shared part&
Dim Shared kk1 As _Unsigned Long
Dim Shared kk2 As _Unsigned Long
Dim Shared kk3 As _Unsigned Long
Dim Shared kk4 As _Unsigned Long
Dim Shared kk5 As _Unsigned Long
Dim Shared kk6 As _Unsigned Long

Dim Shared clr~&
part& = BASIMAGE1&

Type weapon_type
    style As Integer
    pole As Integer
    rhead As Integer
    chead As Integer
    lhead As Integer
    blade As Integer
    handle As Integer
    fgard As Integer
    k1 As _Unsigned Long
    k2 As _Unsigned Long
    k3 As _Unsigned Long
    k4 As _Unsigned Long
End Type
Dim Shared weapon_limit
weapon_limit = 80
Dim klrset(12, 3) As Integer
Dim Shared wlook(weapon_limit) As weapon_type
_Source part&
'read the colors from the color reference bar whichever color is in the top left corner will be transparent
clr~& = Point(0, 0) 'find background color of image
kk1 = Point(0, 1): kk2 = Point(0, 2): kk3 = Point(0, 3): kk4 = Point(0, 4)
_Dest part&
Line (0, 0)-(0, 8), clr~& 'erase the color reference bar from the bit map
_ClearColor clr~&, ms& 'set background color as transparent
_ClearColor clr~&, part&
_Source ms&
_Dest ms&
Do
    Cls
    mmx = 0: mmy = 0
    For m = 1 To weapon_limit
        'create a new set of weapon sprites
        wlook(m).style = Int(1 + Rnd * 20)
        '1- pole only
        '2 - pole and chead
        '3 - pole chead,rhead
        '4 - pole chead,rhead and lhead
        '5- pole rhead and lhead
        '6- pole and rhead
        '7- sword and handle
        '8- sword , handle, and foregarde
        '9- sword and pole
        '10- sword, pole and foregarde
        '11- sword, pole and  lhead
        '12- sword,pole lhead and rhead
        Select Case wlook(m).style
            Case 1
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = 0
                wlook(m).chead = 0
                wlook(m).lhead = 0
                wlook(m).blade = 0
                wlook(m).handle = 0
                wlook(m).fgard = 0
            Case 2, 18
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = 0
                wlook(m).chead = Int(1 + Rnd * 20)
                wlook(m).lhead = 0
                wlook(m).blade = 0
                wlook(m).handle = 0
                wlook(m).fgard = 0
                wlook(m).style = 2

            Case 3, 13, 19
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = Int(1 + Rnd * 20)
                wlook(m).chead = Int(1 + Rnd * 20)
                wlook(m).lhead = 0
                wlook(m).blade = 0
                wlook(m).handle = 0
                wlook(m).fgard = 0
                wlook(m).style = 3

            Case 4
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = Int(1 + Rnd * 20)
                wlook(m).chead = Int(1 + Rnd * 20)
                wlook(m).lhead = Int(1 + Rnd * 20)
                wlook(m).blade = 0
                wlook(m).handle = 0
                wlook(m).fgard = 0

            Case 5, 20
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = Int(1 + Rnd * 20)
                wlook(m).chead = 0
                wlook(m).lhead = Int(1 + Rnd * 20)
                wlook(m).handle = 0
                wlook(m).fgard = 0
                wlook(m).style = 5

            Case 6, 14
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = Int(1 + Rnd * 20)
                wlook(m).chead = 0
                wlook(m).lhead = 0
                wlook(m).blade = 0
                wlook(m).handle = 0
                wlook(m).fgard = 0
                wlook(m).style = 6

            Case 7, 15, 16
                wlook(m).pole = 0
                wlook(m).rhead = 0
                wlook(m).chead = 0
                wlook(m).lhead = 0
                wlook(m).blade = Int(1 + Rnd * 20)
                wlook(m).handle = Int(1 + Rnd * 10)
                wlook(m).fgard = 0
                wlook(m).style = 7

            Case 8
                wlook(m).pole = 0
                wlook(m).rhead = 0
                wlook(m).chead = 0
                wlook(m).lhead = 0
                wlook(m).blade = Int(1 + Rnd * 20)
                wlook(m).handle = Int(1 + Rnd * 10)
                wlook(m).fgard = Int(1 + Rnd * 10)

            Case 9, 17
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = 0
                wlook(m).chead = 0
                wlook(m).lhead = 0
                wlook(m).blade = Int(1 + Rnd * 20)
                wlook(m).handle = 0
                wlook(m).fgard = 0
                wlook(m).style = 9

            Case 10
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = 0
                wlook(m).chead = 0
                wlook(m).lhead = 0
                wlook(m).blade = Int(3 + Rnd * 18)
                wlook(m).handle = 0
                wlook(m).fgard = Int(1 + Rnd * 10)
            Case 11
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = 0
                wlook(m).chead = 0
                wlook(m).lhead = Int(1 + Rnd * 15)
                wlook(m).blade = Int(1 + Rnd * 20)
                wlook(m).handle = 0
                wlook(m).fgard = Int(1 + Rnd * 10)
            Case 12
                wlook(m).pole = Int(1 + Rnd * 20)
                wlook(m).rhead = Int(1 + Rnd * 15)
                wlook(m).chead = 0
                wlook(m).lhead = Int(1 + Rnd * 15)
                wlook(m).blade = Int(1 + Rnd * 20)
                wlook(m).handle = 0
                wlook(m).fgard = Int(1 + Rnd * 10)
        End Select

        wlook(m).k1 = _RGB32(Int(80 + Rnd * 150), Int(80 + Rnd * 150), Int(80 + Rnd * 150))
        If Rnd * 6 < 2 Then wlook(m).k1 = _RGB32(Int(80 + Rnd * 150), Int(80 + Rnd * 120), Int(80 + Rnd * 50))
        kk = Int(155 + Rnd * 100)
        vk1 = kk: vk2 = kk: vk3 = kk
        Select Case Int(Rnd * 10)
            Case 1
                vk1 = Int(vk1 * .8)
                vk2 = Int(vk2 * .9)
            Case 2
                vk3 = Int(vk3 * .8)
                vk2 = Int(vk2 * .9)
            Case 3
                vk1 = Int(vk1 * .8)
                vk3 = Int(vk3 * .9)
        End Select
        wlook(m).k2 = _RGB32(vk1, vk2, vk3)
        wlook(m).k3 = _RGB32(Int(vk1 * 0.7), vk2 * (0.7), Int(vk3 * 0.7))
        kk = Int(150 + Rnd * 100)
        wlook(m).k4 = _RGB32(kk, kk, Int(kk / Int(1 + Rnd * 10)))

        draw_weapon mmx, mmy, m, 1
        mmx = mmx + 32
        If mmx >= _Width Then
            mmx = 0
            mmy = mmy + 64
        End If
    Next m
    md$ = "Weapon Sprite Sheet generated " + Date$ + " at " + Time$
    md2$ = "Mini-Weapon-Mixer V0.1 by James D. Jarvis"
    _PrintString (0, 321), md$
    _PrintString (0, 337), md2$
    Do
        _Limit 60
        kk$ = InKey$
    Loop Until kk$ <> ""
    If kk$ = "C" Or kk$ = "c" Or kk$ = "S" Or kk$ = "s" Then
        _ClipboardImage = ms&
        _Delay 0.3
        Locate 1, 1: Print "Sprite Sheet Saved to Clipboard"
        Sleep 3
    End If
Loop Until kk$ = Chr$(27)
_FreeImage part&
System


Sub draw_weapon (Mx, my, mid, scale)
    'generate a monster image from source sprite sheet part& and render to the programs main screen ms&
    tempi& = _NewImage(32, 64, 32)
    'tempi& creates a temporary one sprite image for rendering
    _ClearColor clr~&, tempi&
    _Dest tempi&
    Cls
    'Locate 1, 1: Print wlook(mid).style
    Select Case wlook(mid).style
        Case 1 To 6
            _PutImage (0, 32)-(31, 63), part&, tempi&, ((wlook(mid).pole - 1) * 32, 64)-((wlook(mid).pole - 1) * 32 + 31, 64 + 31)
            If wlook(mid).rhead > 0 Then _PutImage (0, 0 + 16)-(31, 31 + 16), part&, tempi&, ((wlook(mid).rhead - 1) * 32, 32)-((wlook(mid).rhead - 1) * 32 + 31, 32 + 31)
            If wlook(mid).lhead > 0 Then _PutImage (0, 0 + 16)-(31, 31 + 16), part&, tempi&, ((wlook(mid).lhead - 1) * 32, 96)-((wlook(mid).lhead - 1) * 32 + 31, 96 + 31)
            If wlook(mid).chead > 0 Then _PutImage (0, 0 + 16)-(31, 31 + 16), part&, tempi&, ((wlook(mid).chead - 1) * 32, 0)-((wlook(mid).chead - 1) * 32 + 31, 0 + 31)

        Case 7, 8
            _PutImage (0, 0 + 24)-(31, 31 + 24), part&, tempi&, ((wlook(mid).blade - 1) * 32, 128)-((wlook(mid).blade - 1) * 32 + 31, 128 + 31)
            If wlook(mid).handle > 0 Then _PutImage (0, 0 + 24)-(31, 31 + 24), part&, tempi&, ((wlook(mid).handle - 1) * 32, 160)-((wlook(mid).handle - 1) * 32 + 31, 160 + 31)
            If wlook(mid).fgard > 0 Then _PutImage (0, 0 + 24)-(31, 31 + 24), part&, tempi&, ((wlook(mid).fgard + 9) * 32, 160)-((wlook(mid).fgard + 9) * 32 + 31, 160 + 31)

        Case 9 To 12
            _PutImage (0, 32)-(31, 63), part&, tempi&, ((wlook(mid).pole - 1) * 32, 64)-((wlook(mid).pole - 1) * 32 + 31, 64 + 31)
            If wlook(mid).rhead > 0 Then _PutImage (0, 0 + 16)-(31, 31 + 16), part&, tempi&, ((wlook(mid).rhead - 1) * 32, 32)-((wlook(mid).rhead - 1) * 32 + 31, 32 + 31)
            If wlook(mid).lhead > 0 Then _PutImage (0, 0 + 16)-(31, 31 + 16), part&, tempi&, ((wlook(mid).lhead - 1) * 32, 96)-((wlook(mid).lhead - 1) * 32 + 31, 96 + 31)

            _PutImage (0, 0 + 13)-(31, 31 + 13), part&, tempi&, ((wlook(mid).blade - 1) * 32, 128)-((wlook(mid).blade - 1) * 32 + 31, 128 + 31)
            If wlook(mid).fgard > 0 Then _PutImage (0, 0 + 13)-(31, 31 + 13), part&, tempi&, ((wlook(mid).fgard + 9) * 32, 160)-((wlook(mid).fgard + 9) * 32 + 31, 160 + 31)
    End Select


    _Source tempi&
    'repaint source image with generate color values for new monster sprite
    For y = 0 To 63
        For x = 0 To 31
            Select Case Point(x, y)
                Case kk1
                    PSet (x, y), wlook(mid).k1
                Case kk2
                    PSet (x, y), wlook(mid).k2
                Case kk3
                    PSet (x, y), wlook(mid).k3
                Case kk4
                    PSet (x, y), wlook(mid).k4
            End Select
        Next x
    Next y
    'generated image in tempi& is rendered to ms& as a 32 by 64 sprite

    _PutImage (Mx, my)-(Mx + 31, my + 63), tempi&, ms&
    _Source ms&
    _Dest ms&
    _FreeImage tempi&
End Sub

'================================
'PNG file saved using BASIMAGE1&
'================================
Function BASIMAGE1& 'weapon_pieces.png
    v& = _NewImage(640, 192, 32)
    Dim m As _MEM: m = _MemImage(v&)
    A$ = ""
    A$ = A$ + "haIkM_ULLLT\504KB\9aV4SeD:=F<Ie?dH\RC`>l?LkBaiJjTIT?ZX[6TjS?"
    A$ = A$ + "nhk?000VS?o:oH00h5mmgO6O<0o]ci8nKUm^cfTGo_=gC?oCVoGO=keOh?QK"
    A$ = A$ + "WSB?6PoOhnoIKb[oMYo?m0>?km<DI?4g;[Z63Yco?Mmof9hZ6g_KLgCfJOjW"
    A$ = A$ + "o#nm0Y73Y\jm9I=8mI`>D3VVKelcjoXRnOfcIoGGeHhIoj:73EWMWTnLOjlW"
    A$ = A$ + "\d?kY3[obO^?koH_?YZ17cG?PiZmEG_k#oO[OmnoL5SQWm[OG[oMBjkMFSQd"
    A$ = A$ + "eQYjF]?mgoCjeoYWOjeodgiV^gW>d3J7639Vc;E>_gkijIonGeHh\<ClmoFM"
    A$ = A$ + "oOgK^FM=X3BOgg=CinV>:MoOYOVCjl?>6BUOjk0BOOK7VoMHOHjj#RikN?PE"
    A$ = A$ + "WoSnW[:kD_o]TiW^ng5Mh<o4[k7U^gSdmo=il_Y3iWlNPdWoCO7hTko;mn^M"
    A$ = A$ + "EWoSnW[:KmoEOfMAjknVJMo8moU9oenndW1jBnYN78Yoi^Y;eoY=6Bmm_N_a"
    A$ = A$ + "#Z\goeEUmcne_ci__fWn>XDBm^__gNQY9mmnjoCoO[cO9oiPGoOcZo_mnnB>"
    A$ = A$ + "oC]g;Io7WUMUSQdiOfh8aNPddoGFC^o[d[o[ilanOB>oCWORa#7^oEoOeG3f"
    A$ = A$ + "OVo4koCnb_3B?oCVOjkMCgoEjlC_n;olWoj`n_9ekE7bo\NoB]?HbWoTOnlC"
    A$ = A$ + ";mON_BnnOBoM?TniOYc?ij_lcVO7nngComOT>oeH8m?kMYoI`;mkO>Efb?oJ"
    A$ = A$ + "odn\OM8okmcNbdnn_T_lCn\gdOn[9GoU_lUOnlWHoGYco\O^CBg7jTZobGnM"
    A$ = A$ + "iWm[YFoU_lU_lWHnWmcORnoT_l[=Kmo9Oi;Oi;oZcEoObGnjoKZeOi;OiW?o"
    A$ = A$ + "dOocC=oSIgQa`dZobGnbGnbGnC=Obbj?0000000000000000000000000000"
    A$ = A$ + "0000000000000000000000000000lgU_onchS1POUcU0`Ej[_nWWehi=#O<m"
    A$ = A$ + "cS9VoC_V3<;7kocmO#?<mcSYjoKbeLPIiFoO;^k3jQYg;BZiod[k0canko[C"
    A$ = A$ + "gm]gKJW6KDW9^fgacSCI=OZeLPIYSmHML<eYa5e_78eW=9mn]^doGbN`l>01"
    A$ = A$ + "hjdagoWNoV]cjo_ja#jmMMhlHjg1GjnoL_3<7ClW1^TmoM<kmWi[g_gOgK=n"
    A$ = A$ + "\m0GaNQ7mWmY:fkm:iOUS1iOnj\nonej#ja1DUYe3Hb_W]WeoGjg1dEKj?Wi"
    A$ = A$ + "EGo_ZJdjOgEW[lkOnMiLIRaAWZ1MH<#>[mREWgDfc]GOkDoOELooSbm:cN_O"
    A$ = A$ + "k^]O[jgoEbno>>6>KmYRiOjgoedc_j\_GnEnIOOUl[^nWNnGY7MoGeig]iO5"
    A$ = A$ + "eRGYoSZ[oE^?XC[okonEd3hmZoEdKfnl[CWoGSWD?omNmRoWN\Xo?igUnoNf"
    A$ = A$ + "Wo9AnEFokfl_C[oC=o[\fO_l[hIoM\nOeejkUoIcaZ>;nOYo_[XgSEF?J]?m"
    A$ = A$ + "WoiZkonEGo_ji_noVMnEWmNnM[oW[>KcoO?omkR>>^BFoCWOZmOENnoh_GEm"
    A$ = A$ + "0W^o_GIlMUm0n:eo[J_`nlZbemcVo?Zg_4k?ZHLl\n_[Zo3ig_l[^o_SoN9j"
    A$ = A$ + "oi\lCdoMjioISS:Wo;We7HUiGQG9oZjoL?_:Z9o=DoOWm:goLEeWcj_Y3com"
    A$ = A$ + "J#7fKLU[1Mim?UNm_KcoYlnoNfcg^baamb_ZcoMMnOfNTdco[X?XZOO3o=TO"
    A$ = A$ + "U?c[Sco9iN_gQ:oloMMmO2k;fGc?noFe[o9Ze_bl_ZWoW>oZc^kVnk6HO?Bb"
    A$ = A$ + "a`Eeo7onJmdg_3hIOYk1Z;iWNM89??\?eQ[jk060nEY__?]dmoT>o^<6BKjc"
    A$ = A$ + "o>E7j`H00N_U^gWdigUa0mPm10`4TniMYcohhX;S500h:U^WWdigea200000"
    A$ = A$ + "000000000000000000000000l0One?58o_njWVhl?MnZoc^n;Oi;Oi;oIVod"
    A$ = A$ + "OnGjiObl_EcGogF`HogH`1GoG[1[eQ8co?bVOjcobOfiOKOObmoYc?MmGnc^"
    A$ = A$ + "oWY?oCgog^9=ok#nY_oOUojGGMnY?o;oIWOjcOYWobOfiWniOCOnW>OeOmo]"
    A$ = A$ + "f7DeHHoM>GmkQFnIcoXdgoTllgN=?I?X9WkkkoZN<L<o4eQXOo?3^oSdOoWC"
    A$ = A$ + "?oO#oOaonO?n>0[bI_ki:_7#nIco\aAUi^TnlGjioJ<TZf?mn_BWOjWoU^o_"
    A$ = A$ + "^Lgg4co7doGlnoFk5BUkTonGVDnW]7oAiGaIRYonoVdn?iOR1goWiOnlCGoC"
    A$ = A$ + "WOjno>nI`CTOjmOb_^l?kmlLFnE^WLBeo7=6BUM7joNb_oad?o;mkoKbOo[Y"
    A$ = A$ + "co7doG\mok?7nMom?Tnm?U>odeoE>_b?oQE^W8icnSOok7c]o?ioAlWoU^o_"
    A$ = A$ + "9om_V>oOHhmoMlIREWm:cejnkNoOWeWamjoh:NoCYcoD5_oo\kL^Wg]mObGn"
    A$ = A$ + "M;o^ll?co<codiW^nW>odOn_diWlim9jo8MnoV#koS?_oGYOgKYcO]FTL^Ol"
    A$ = A$ + "co<YlGS1_o_IfoaIO^o9UOjjO7b?nio?bocNdTol?Yc?mnodiW^nW>oeH8Ef"
    A$ = A$ + "Y_oKji?mcOYkocgok\OnCjcoY?o9oiNoG7b?mkO;MnYgo9oIOnOjcOi?klCg"
    A$ = A$ + "oGjiOjcoYc?MmOjiWNm?Mn[a#Z\WNn^ogm_bO^iWl?o_MHnWnlOjlCGoWNnY"
    A$ = A$ + "OoKYcoV9goEjleoWkOUoLcO]ggio0cm6TOjjodc?mj_lUoT_oIjcOi?klmio"
    A$ = A$ + "LokTgoW>od_o]diOcTOoKYcgmo^oEnc=OWoeogTgoW>od[oYcO=6BUmdcgmo"
    A$ = A$ + "^oEnc=OWo7ncO7nnodiWnm_U>odkoUo\_oIjcOi?kleoWkOWlnodiWNm?Mn["
    A$ = A$ + "a#Z\WNn^ogm_bO^kolWogQolgQOn;MnYOoKYcoV9goEjleoWkOUOfmOMhkOa"
    A$ = A$ + "io0cm6TOjjodc?mj_lUoT_oIjcOiWOoGj?o_noLokD?oU>od_o]diWNo_loi"
    A$ = A$ + "c0BTOjcOY[oYWobOfkodoGnkOMocLc?mj_lU_noLo[lmnoVJm?mm_^oI^iWn"
    A$ = A$ + "lGjmObOfiWnlgdWoC?od[ojocj_kOVKna?oma\oco`dcgkocm_C=oS[mYf3T"
    A$ = A$ + "NoWoloZo_YNn_3i[o?i[o_iNoOjioTc_;moimo=gcoYc?MmOji7olg7c^o7i"
    A$ = A$ + "7>oQOoOjioTcGoOoLN[o_0cm6TOjjodcGoObOdi?lkoC?oWNnYGoWNnFoWMm"
    A$ = A$ + "OjiWNmGnb?jm?#Hfk30000000000000000000d39okN=HBLF30BKmgkfnko7"
    A$ = A$ + "X6C_o_^<okbh0PZ]jmCoO#=BnOWSjR><o]>0<I[nnlgmm#=VNO7MHngQa00Y"
    A$ = A$ + "LlMoME_o_SokF?VcTWenkeR9G?j`l?Mn0TDEmVMF>j3L6>kcHdUen4m0T^o_"
    A$ = A$ + "dmmTNnOL<T\>0#BElnofcBoOcDgjo?E?0Yko9M_?MIn[o?HfVnOV7Z\o_Si]"
    A$ = A$ + "g7`RkUOoL_gognN]ZGogcjHnGiHhNI8onTO5koBhMOn1_:mnmJ?Gn?I]nIVl"
    A$ = A$ + "mC_c_GRWegOe[o?JlDEo7?[>T:odcoTiOUIgQcf9oI`X3cObY3OW?;MkW3YD"
    A$ = A$ + "ePmgoaEGCBOgoaa`S67YF;ZlmOTHne]nolnoToIiOEinXkJZZggDigQioSDM"
    A$ = A$ + "nMkmODAnMhnodmO<emo?km<FEnkmoUZnO_mNE]6Deco>[VWHmoNSYcb?Mo7b"
    A$ = A$ + "O>moeUgmi4Vo?[6l^goCjlOfhXbcnW]?H:eok=f^Zl_gI^kEKZHM?AoO_jjo"
    A$ = A$ + "E^6dYko[JmoAeRcFoCgoQleoGRaPioeUoa<fg[GInC_ocD?okNePSon_SmoM"
    A$ = A$ + "F?7E?gNdJNZjoSjmkZko[b?okmb]jm0?K?IU?3jEN>DZlC?oCVORnOFo_WJ^"
    A$ = A$ + "GEnMHnoXW1MUiOFOOEVooUahEgoIZl?j\W3m^GokNnE\VoXg1EbiO5mo]Z1g"
    A$ = A$ + "k>`[Lng]mEWEWgG3B_7Xbi^l[YoW7m_k:nla?kloEVOjioJ^GMn_jW]8ik7I"
    A$ = A$ + "Ri__OHJco^UOENUgobkLmoAOng9\n__?X;ePZf3nXnOTokmnoSgmUN\D]dW["
    A$ = A$ + "kdWoUoaD?;0CGgNWTE?_C=gkBnYG7B=gWhckB>_ek70mcD_G>M?#Yb?ml>]Y"
    A$ = A$ + ">gC_G?ml70hVdm1Yo?ZNM?mH00X3Bo<aZcG_O00<MYk5:AoOY[i000000000"
    A$ = A$ + "000000000000000000000`4Tj_OhGogUXYVObJ?00iO>LjN#VJ?HM9oD[md3"
    A$ = A$ + "Cml?iOf3TN?H7^o;M?0C<oSI?mlC\fCNYg3T>oeH8mj`DWkYcWlB_78mM?Om"
    A$ = A$ + "eLoN#Gcmdmo<al?>6BT=I]FkWlm?[a#jeRY>gC_fCFY?ogQWoWZ7Xmn?BD3>"
    A$ = A$ + ">gWfl?MnkSQZcVlBNoc:oY_o?MfM8Ogo<CYGok`M?joKVmOU>omaAR\9_d_o"
    A$ = A$ + "_^doIZjOj\k#nY77CFjeo^LoCR\Cgog:kDePTmoealC?6Z>kDBo<WdiOLLLK"
    A$ = A$ + "m?Mn9ko;icOFSQTIW<o9NgCgTNoWnodoG7jmY3iWN<DMfkZ\>T^7\^TOG^o="
    A$ = A$ + "eH8MoWCM^O<o4ICnmOMjnWDeNmoeSNOj#nY73EWmBZJ#GVg9c?mjoTc?mcOk"
    A$ = A$ + "B]?AfTOoWnodoGGjmY3iWN<DMfg\?oCdoG7Vk9bohjOZiOjmOjo;On9bNEoC"
    A$ = A$ + "UM7<in_BW_nojGoGYc?mHXj\CfkGjiN7bOMf?AfMX6<ikog[m9c_jLgG3BUo"
    A$ = A$ + "J<T<kYfoEjlCOnGoOm;odSQZc^CmoU^fWhlOW^oEoOcJogal[>gmePDi_639"
    A$ = A$ + "c^;WoWFnY?o[o_nUOja#eIWLNgaeo4eod_3bdkoVjmoken9goGbn?BWoDko:"
    A$ = A$ + "MnY?o[o?i_?6BUMRiM7ZoYc?mJ#jnOfG3ZLNOfmoYOogYb?ajnnj`Dc_;WoW"
    A$ = A$ + "Fnjo;ocoVNnkSQDIWHNgQjOjlGWmCEog[1C9Omom[iWHMOOM8EnC]oWYW_no"
    A$ = A$ + "bol_YWonH8Ef9VgMXnWnkn\Cgo>Ymojo;G]oN[3Yb_;WoTOmIgQnoFBol_YW"
    A$ = A$ + "OeIgQa#jiodGoWJoGW=oCTMjj_mojoCnc=oSmoU:oYn\W>Toaa`4WoMiiOYF"
    A$ = A$ + "kC?6BOogdcOjWodoWlCOn;MoGb?OnCNoGGNnCblCTMGFoWLn[a#jeoTiWnco"
    A$ = A$ + "200000000000000000000000000000000000000000000000000000000000"
    A$ = A$ + "00000000000000000000000000ekk_olod_?0lWcWohffOEUioeGo^DckTe1"
    A$ = A$ + "HJdo70IU^WWZkmkNcMmm1eAoO0TEjNOBfoG7VoDojmObook_]lGokn\mlENF"
    A$ = A$ + "#oO0TEjnOVNoO[LWBngkM^FekRMjiOfhh\oi[f:]Wmk10GSdmodQno^UMbn_"
    A$ = A$ + "Z\n_WeIiOemol:cogelC_ngYl?f_WNo0NWmZgeVhM0<YolO\G3BeoGbjoIIW"
    A$ = A$ + "H?`TkoAnolkk=F_OOne?=\lCOfOO<<]ioDcoA?k9EO?C:O0hSAgoG[b?mjOC"
    A$ = A$ + "bgWoFn0#1BoloeHHZiW^ng\lSd7`Tgo9O0VYd?oO=6VJnY[o=;Omo9O0X0YO"
    A$ = A$ + "noJ<<elCGoKFnjoCn0#1BoloeHHZiW^ng\leoWl1P2Tnio[a`Dc?Mm_Ai7k?"
    A$ = A$ + "30CNoWl10XHncoI`nNU?004AbnOBgoMjl10P9:I_OWmo50000000P?nnoaJo"
    A$ = A$ + "%%h1"
    btemp$ = ""
    For i& = 1 To Len(A$) Step 4: B$ = Mid$(A$, i&, 4)
        If InStr(1, B$, "%") Then
            For C% = 1 To Len(B$): F$ = Mid$(B$, C%, 1)
                If F$ <> "%" Then C$ = C$ + F$
            Next: B$ = C$: End If: For j = 1 To Len(B$)
            If Mid$(B$, j, 1) = "#" Then
        Mid$(B$, j) = "@": End If: Next
        For t% = Len(B$) To 1 Step -1
            B& = B& * 64 + Asc(Mid$(B$, t%)) - 48
            Next: X$ = "": For t% = 1 To Len(B$) - 1
            X$ = X$ + Chr$(B& And 255): B& = B& \ 256
    Next: btemp$ = btemp$ + X$: Next
    btemp$ = _Inflate$(btemp$)
    _MemPut m, m.OFFSET, btemp$: _MemFree m
    BASIMAGE1& = _CopyImage(v&): _FreeImage v&
End Function
Reply
#2
Thumbs Up 
Now we're going to need a good sprite-rotation routine, not just flipping for that combat game I've been dreaming about LOL. Monsters versus robots, equipped with these weapons. I was going to write something raw but need a lot of patience with it. Previously the creatures were going to be presented as they were with simple graphics as the visual effects such as photon rays or slime as attacks. But this is something I had been dreaming about.
Reply
#3
(12-03-2022, 11:48 PM)mnrvovrfc Wrote: Now we're going to need a good sprite-rotation routine, not just flipping for that combat game I've been dreaming about LOL. Monsters versus robots, equipped with these weapons. I was going to write something raw but need a lot of patience with it. Previously the creatures were going to be presented as they were with simple graphics as the visual effects such as photon rays or slime as attacks. But this is something I had been dreaming about.

There's a good Rotozoom routine I've seen posted here on the forum that would likely serve nicely for scaling and rotating the sprites. I'd be thrilled to see any sort of game someone was able to make that used these sprites.
Reply




Users browsing this thread: 1 Guest(s)