Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mini-Monster-Mixer
#1
Mini-Monster-Mixer v0.1 generates a sprites sheet of 40 monster sprites at 64x64 pixels.
A source image of parts (included in the program code) has pieces that are randomly selected and recolored to generate the final images. 
Press c or s to save the currently displayed sprites sheet to the clipboard if you wish. (to be pasted into any paint program afterward).

Code: (Select All)
'Mini-Monster-Mixer v0.1
'By James D. Jarvis November 2022
'This program uses BASIMAGE coded by Dav for QB64GL 1.4, MAY/2020
'
'generate a sprite sheet of monsters
'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-Monster-Mixer v0.1 created by James D. Jarvis
'
Randomize Timer
Dim Shared ms&
ms& = _NewImage(512, 360, 32)
Screen ms&
_Title "Mini-Monster-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 clr~&
part& = BASIMAGE1&

Type critterbody_type
    head As Integer
    arm As Integer
    torso As Integer
    leg As Integer
    k1 As _Unsigned Long
    k2 As _Unsigned Long
    k3 As _Unsigned Long
    k4 As _Unsigned Long
End Type
monster_limit = 40
Dim Shared mlook(monster_limit) As critterbody_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, 4), 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 monster_limit
        'create a new set of monster sprites
        'included image source has 16 options for head,arms,torso, and legs
        mlook(m).head = Int(1 + Rnd * 16)
        mlook(m).arm = Int(1 + Rnd * 16)
        mlook(m).torso = Int(1 + Rnd * 16)
        mlook(m).leg = Int(1 + Rnd * 16)
        'generating new colors for this specific monstewr sprite
        kr = Int(Rnd * 150 + 105): kg = Int(Rnd * 150 + 105): kb = Int(Rnd * 150 + 105)
        kr2 = Int(kr / 2): kg2 = Int(kg / 2): kb2 = Int(kb / 2)
        kr3 = Int(kr2 / (1.2 + Rnd * 3)): kg3 = Int(kg2 / (1.2 + Rnd * 3)): kb3 = Int(kb2 / (1.2 + Rnd * 3))
        mlook(m).k1 = _RGB32(kr, kg, kb)
        mlook(m).k2 = _RGB32(kr2, kg2, kb2)
        mlook(m).k3 = _RGB32(kr3, kg3, kb3)
        mlook(m).k4 = _RGB32(Int(Rnd * 220 + 33), Int(Rnd * 210 + 33), Int(Rnd * 200 + 33))
        draw_monster mmx, mmy, m, 3
        mmx = mmx + 64
        If mmx >= _Width Then
            mmx = 0
            mmy = mmy + 64
        End If
    Next m
    md$ = "Monster Sprite Sheet generated " + Date$ + " at " + Time$
    md2$ = "Using Mini-Monster-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_monster (Mx, my, mid, scale)
    'generate a monster image from source sprite sheet part& and render to the programs main screen ms&
    tempi& = _NewImage(32, 32, 32)
    'tempi& creates a temporary one sprite image for rendering
    _ClearColor clr~&, tempi&
    _Dest tempi&
    Cls
    hs = Int(Rnd * (scale * 2))
    _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).leg - 1) * 32, 96)-((mlook(mid).leg - 1) * 32 + 31, 96 + 31)
    _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).arm - 1) * 32, 32)-((mlook(mid).arm - 1) * 32 + 31, 32 + 31)
    _PutImage (0 - Int(hs * .8), 0)-(31 + Int(hs * .8), 31), part&, tempi&, ((mlook(mid).torso - 1) * 32, 64)-((mlook(mid).torso - 1) * 32 + 31, 64 + 31)
    _PutImage (0 - hs, 0)-(31 + hs, 31), part&, tempi&, ((mlook(mid).head - 1) * 32, 0)-((mlook(mid).head - 1) * 32 + 31, 31)
    _Source tempi&
    'repaint source image with generate color values for new monster sprite
    For y = 0 To 31
        For x = 0 To 31
            Select Case Point(x, y)
                Case kk1
                    PSet (x, y), mlook(mid).k1
                Case kk2
                    PSet (x, y), mlook(mid).k2
                Case kk3
                    PSet (x, y), mlook(mid).k3
                Case kk4
                    PSet (x, y), mlook(mid).k4
            End Select
        Next x
    Next y
    'generated image in tempi& is rendered to ms& as a 64 by 64 sprite
    _PutImage (Mx, my)-(Mx + 63, my + 63), tempi&, ms&
    _Source ms&
    _Dest ms&
    _FreeImage tempi&
End Sub

'================================
'PNG file saved using BASIMAGE1&
'================================
Function BASIMAGE1& 'mparts32a.png
    v& = _NewImage(512, 128, 32)
    Dim m As _MEM: m = _MemImage(v&)
    A$ = ""
    A$ = A$ + "haIkM6PTSS235M^TiBfGbIG_Ma6I516\AB4k7EmVTHkP0QP?PMji?oi?om?0000`SR]DfU1hHNmZofYA^f[FVRbF[XmSTAjW>cndolc?o7AmmPSY4g[9kb5l"
    A$ = A$ + "maIkSZCAG^OJf_WniA=F#FSoD\A6f_XWE#KKmimX^;Se\Ro:YIi;Te3MMZElO[_gMQGo[CFBDaMbH?Ik]E<XWnnXZo[:g5mWcdfE;UEMoYHO]VS^oOTJoBk:"
    A$ = A$ + "OODnP8]o_SinjoO]fl?TGc\7keZMGWl>6H[>MDb;=7Mo<[nNAdG\XgmY_?Vi0LDk_GJoJmnS`cfO[fgS>_7]7bHnIk_KUOeBW9_>cH5UhMI\_gnlEanUfM;k"
    A$ = A$ + "7eJM\638bml_Fm?:moFfOfU1[nf5]NYmefeWaPoKheO9bjZEmg[nQbjF_coa[a3\dnUn1_lmjjF[fO_R1N[_oNn^FOf_H_j]]7MniGFlEoicmlimL[ZgnonJ"
    A$ = A$ + "lLOPZUldWOT]SZ<dJ=#AYoG\Ud^AioU[a#JobJClffAKoBO?Mi#WdffSm0XV][E6l8^kmhlk][lHnHcmkc]L>gFjONDFf?VK]mRcgm2?cfoR?hcjlkH0oSmJ"
    A$ = A$ + "GomFoGf>KmnIgF[WKeAY?WCV?c7g:iM\Wfo[WCD4U1Y^S>N<Bmo\foSl7oY]mmHmoeR1?:n?Rm2_UmmaogNmoNf^K=o?ikmL<?K]omSe:m7NFoOkce[9dom0"
    A$ = A$ + "bJ]VbSiUM7=UEi`_HoGomcnLOZo9S9mb78g3l<fkogfnMo#_Kgo\mhcnoAk3R:V_MK#LnnJS1nkkS[=8choE`nbHPXSm\\M4UQ\eoOG>f7k[k34U_?jaOUkU"
    A$ = A$ + "ManbbbFbkWkAmn>:mmbSkU]UYJnoBIakh0_[_mj7RZo_T?k_7[n_U?8jWcjEag[K3RN>0A7o_:fG7oWAM?jioTinoGcNe:?A4gUaH0IJoNdomL^7eJceYXd2"
    A$ = A$ + "bjgh[e_cUX;7AeO[6I<nWEI83K[mmIe6Tm_am\Sk]dNR\^WAlGF?oOF]1JoOTnn\6oE?g_873dJ?8Ta3A]g3jkgUNn7geOc][6IYkD8;mGhiB]Hn<j;TeHMF"
    A$ = A$ + "c18J]oEI>`AcCEoGG6d9dm10lVFJ<?1mWgeeWmOoKbT\^oWbOGMFcocjg:dMZn30l\IUFo?l<9[koPDo_lnRfKTjoFnP\KC00N6XejAk7N:8eiU_6Yf?0000"
    A$ = A$ + "4?jkm3g380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PXie[ofme:C[#I"
    A$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"BGM^DWY=XV>oIRo^bN1HYQ7ANDKO5ZQd_E3[l\ghVc6k=Sl:Kk?3bfnGQIkooV\_GaoIgVf;GEkoMnL]i0DG;gJ=RcK>0cJn3GA3=[hoIDf;iSneNbWIXm:c"
    A$ = A$ + "[AW7lEfonIEG\dmg7[gFogjHSh3^jJgVALLffOFT]m_Ji>SlIVJVW9_bfnIbE7gOFiWF__ecgD[eoLUiPLEO`EnnIfocBkn<emcV7ml\n=BN=jmPO6JojjbE"
    A$ = A$ + "do_JMOF?C4AagXNiMRIko;cW4kWOKkA<SemoIN>fO3oVen?HIoc<7T[j;7mkUMlW^<O5mo[T7c\n?Zfk<mo7m<iejk<;KWU_o<Pnombo?bh?N\O9S^OFI?nK"
    A$ = A$ + "F<KMggiKOj_O^_ci=7T<IeRoVQnOVd[6h\Gk_dnN<_Rk:XoO_loXoSnO=mojgkni^VUIml861?eh?_HTWMFdocU_]kGjM3?loSTWNef?Zn_7f?kffS`CmaFi"
    A$ = A$ + "mN]Iof_Bic3#fnjFa9Ifok>b8g3lI[m;;3XmO<N\n?8Oo?joO7Smj]nOmc7gmYLE_OXbTGmonFR3W9SnkW5mO0bQ\eoOj[o:;moW>UH3m[[NNo]`8?gMNXCk"
    A$ = A$ + "el:0h>aZXoo]D_V=NL_go=OGkmM?Kdo>iVY_bclnKQNGo?jo0T3jdZW_g=fBKSAiUo_TgIG?QW7mngn^2cZ?#9MVoF41`C2?eXAo7o?0]#[A?;mO[l60H?Xo"
    A$ = A$ + "Po7P\X\>M_RoOjo><1000FA:JcNYokEN30000000000000000000000000d7bo6:m4okY4000`C3kooZTonF3000L7YU^?Jo0000g?foo?e]W70c50000hN#"
    A$ = A$ + "ioOZK[oonlIGN1000Pi#?[k_<7P\;[0000`lPml7000hi#O[moI=GP\ooc#\?f7kWWmcN_>cno?ebno?3cfoW]mS<nO5_ooIgo?knOHO\?f?CmWLG[C6So9m"
    A$ = A$ + "gJk7MKaVFCfco83kGRk:aoA77NdJnSJ>AIgoo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[L?0lcGlijoS\mGn\8Wac1c:HOI:Kk7ihOF]1AKKY?83k_2aOIJo8o=7_Rf?;\f3jXeQ]:;iDo]ooT"
    A$ = A$ + "WXlmFno8W3lC<nOUH5dob^<T=?ij>ll`B3:;moeXnoimU?3onniS4oL0b^M1000OiY[oOT?87KojSi04W_0]O00hYaCBc_FM?gmMock3Afn5000000000000"
    A$ = A$ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PeRG_NUNI00000b1V70"
    A$ = A$ + "000#\XCAIg==o=niWO<O=Ko2000`MU=MFM::]gJjnN[o_EUeDkLNk3dci:niPIGoSbnI`8aFAdG8[iO3`:#dSi2oBA[?JmoFJnbGmafOZmgBogkHb<eo?Zn7"
    A$ = A$ + "YmSdWGR_e_NdilP]hl=:YbWSXm_P<N;JK_Jf?SiNWEo_\9[nojfN[dM_mGZeKQ_eKdoe]3enL4aNI\o77eggCkg:N?jn25]Oil0RB3D>_SF7k^Jo=NZmoTnj"
    A$ = A$ + "N?^Weo<V3`AYkLkOFkkoEen_jhbXoOL<fZ<70?m1ej[7iH0K8ek:9doSanbfkJOf;:aho>^knaO:7k^Zog[f_GnPNCU[e7O`[>dOV_NL9Uajn;ekcNOoWAiD"
    A$ = A$ + "jKc`oG[mXfWW_o__nFNe7LdnnNdo_<gGi[mL>?8cmo?Kmg\]o6AgokMLfcBoG[[F>F]nlF]9cZ<9k[E;Y?WG]o7]nciJc?GcoXe_[>fd<dn]f_f[hkSboG;>"
    A$ = A$ + "dcHmFemIN]G]\4Q^O]H9foOdo[mi8\O?7cCoO_7g[jH]nmcfgXCUnLeh\JTm`nePZ7oimiV[=]eokM<^I\fTcn\n;7?^lM^bHdIho[5?J]nC_63HD]EOV7Jn"
    A$ = A$ + "goUJm]m\?_5I]ooeFOSL>8NGoKIo8lmbb#]?7QmkiHAgn?CoP>OJmiA^fcD>TjkjS[KomLN0m]occGoo\kk_dg=SH_AOFoVYfOFnoJne87oITjET[o?:KFJk"
    A$ = A$ + "gB[`no_QNoomfN5K:7OcZ\h]>dAf?2o#dmoZef;]OTco[VoO6co[FLD[?gceNVfXFjGBO^EN[W7`<loILoWe[o_glOd[OTH`NWCA=]oc_foNFoilf3PJJJm>"
    A$ = A$ + "nc<e4?BS=6=hl^o;[dno_QNO7mfNBkJ5[5aJoG1k_QUMRDo?Ckk]o_T7cFoODOD;]Oii;__V?aSm28bfocXoGBnmka[_m1XhoWmHbajokcFedomXlHU_A\g7"
    A$ = A$ + "]dhSJoGF1m7IKNdf<kjOff_hgkiHgAk7]o_V^YlcFWkZm=JYOYeg>JMncNNjA[o[YFMEjGjM?j_BiZeJPVQfO[jI_7kZaPGEogShRJj_NeFKe^fkam`n[PnS"
    A$ = A$ + ">IeN<ki3ebNcH<G\oH]k7ML?83mOm[]ZoFOWcHC[kg_>9?OD?C>FjMN_?PjD[OC0Slli=3\V7`\l5FmWj9n[egoK`nWI=fe>g<ePJef6aNQGc?Odil\LD;=k"
    A$ = A$ + "inIUTnnJWc;k?jim\ngjLcdnF_Ndi^;noJeE?Zg]dn?J<8ieiAmgJ]eA\Nk=Jm\06imn\FICo<2>[h]JYA^V_=kKml>dkmOgSk7oAgc7?JkeiOYO]^oM[ci1"
    A$ = A$ + "S4?hIi00000n>iO0JAWJ%%%0"
    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
+1 Pretty clever, generates different sheets of monsters.
b = b + ...
Reply
#3
(11-18-2022, 03:29 PM)bplus Wrote: +1 Pretty clever, generates different sheets of monsters.

A whole bunch, 40 a time.  There are over 32,000,000,000 possible combinations as is but I'd say 256  (at a time) would be the practical limit for an effectively discrete set of sprites using this tool.
Reply
#4
Here's output from a run:

[Image: image.png]
Reply
#5
Version 0.2 ,  I added in difference of size for height and width and it creates a much more visually interesting sprite sheet.

Code: (Select All)
'Mini-Monster-Mixer v0.2
'By James D. Jarvis November 2022
'This program uses BASIMAGE coded by Dav for QB64GL 1.4, MAY/2020
'
'generate a spirte sheet of monsters
'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-Monster-Mixer v0.2 created by James D. Jarvis
'
Randomize Timer
Dim Shared ms&
ms& = _NewImage(512, 360, 32)
Screen ms&
_Title "Mini-Monster-Mixer V0.2"
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 clr~&
part& = BASIMAGE1&

Type critterbody_type
    head As Integer
    arm As Integer
    torso As Integer
    leg As Integer
    k1 As _Unsigned Long
    k2 As _Unsigned Long
    k3 As _Unsigned Long
    k4 As _Unsigned Long
    xsiz As Integer
    ysiz As Integer
End Type
monster_limit = 40
Dim Shared mlook(monster_limit) As critterbody_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, 4), 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 monster_limit
        'create a new set of monster sprites
        'included image source has 16 options for head,arms,torso, and legs
        mlook(m).head = Int(1 + Rnd * 16)
        mlook(m).arm = Int(1 + Rnd * 16)
        mlook(m).torso = Int(1 + Rnd * 16)
        mlook(m).leg = Int(1 + Rnd * 16)
        'generating new colors for this specific monstewr sprite
        kr = Int(Rnd * 150 + 105): kg = Int(Rnd * 150 + 105): kb = Int(Rnd * 150 + 105)
        kr2 = Int(kr / 2): kg2 = Int(kg / 2): kb2 = Int(kb / 2)
        kr3 = Int(kr2 / (1.2 + Rnd * 3)): kg3 = Int(kg2 / (1.2 + Rnd * 3)): kb3 = Int(kb2 / (1.2 + Rnd * 3))
        mlook(m).k1 = _RGB32(kr, kg, kb)
        mlook(m).k2 = _RGB32(kr2, kg2, kb2)
        mlook(m).k3 = _RGB32(kr3, kg3, kb3)
        mlook(m).k4 = _RGB32(Int(Rnd * 220 + 33), Int(Rnd * 210 + 33), Int(Rnd * 200 + 33))
        mlook(m).xsiz = 64 - Int(Rnd * 32) + Int(Rnd * 4)
        If mlook(m).xsiz > 64 Then mlook(m).xsiz = 64
        mlook(m).ysiz = 64 - Int(Rnd * 32) + Int(Rnd * 4)
        If mlook(m).ysiz > 64 Then mlook(m).ysiz = 64


        draw_monster mmx, mmy, m, 3
        mmx = mmx + 64
        If mmx >= _Width Then
            mmx = 0
            mmy = mmy + 64
        End If
    Next m
    md$ = "Monster Sprite Sheet generated " + Date$ + " at " + Time$
    md2$ = "Using Mini-Monster-Mixer V0.2 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_monster (Mx, my, mid, scale)
    'generate a monster image from source sprite sheet part& and render to the programs main screen ms&
    tempi& = _NewImage(32, 32, 32)
    'tempi& creates a temporary one sprite image for rendering
    _ClearColor clr~&, tempi&
    _Dest tempi&
    Cls
    hs = Int(Rnd * (scale * 2))
    _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).leg - 1) * 32, 96)-((mlook(mid).leg - 1) * 32 + 31, 96 + 31)
    _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).arm - 1) * 32, 32)-((mlook(mid).arm - 1) * 32 + 31, 32 + 31)
    _PutImage (0 - Int(hs * .8), 0)-(31 + Int(hs * .8), 31), part&, tempi&, ((mlook(mid).torso - 1) * 32, 64)-((mlook(mid).torso - 1) * 32 + 31, 64 + 31)
    _PutImage (0 - hs, 0)-(31 + hs, 31), part&, tempi&, ((mlook(mid).head - 1) * 32, 0)-((mlook(mid).head - 1) * 32 + 31, 31)
    _Source tempi&
    'repaint source image with generate color values for new monster sprite
    For y = 0 To 31
        For x = 0 To 31
            Select Case Point(x, y)
                Case kk1
                    PSet (x, y), mlook(mid).k1
                Case kk2
                    PSet (x, y), mlook(mid).k2
                Case kk3
                    PSet (x, y), mlook(mid).k3
                Case kk4
                    PSet (x, y), mlook(mid).k4
            End Select
        Next x
    Next y
    'generated image in tempi& is rendered to ms& as a 64 by 64 sprite
    If mlook(mid).xsiz = 64 And mlook(mid).ysiz = 64 Then
        _PutImage (Mx, my)-(Mx + 63, my + 63), tempi&, ms&
    Else
        tx = Mx: ty = my
        tx = tx + Int(64 - mlook(mid).xsiz) / 2
        ty = ty + Int(64 - mlook(mid).ysiz) / 2
        _PutImage (tx, ty)-(tx + mlook(mid).xsiz - 1, ty + mlook(mid).ysiz - 1), tempi&, ms&
    End If
    _Source ms&
    _Dest ms&
    _FreeImage tempi&
End Sub

'================================
'PNG file saved using BASIMAGE1&
'================================
Function BASIMAGE1& 'mparts32a.png
    v& = _NewImage(512, 128, 32)
    Dim m As _MEM: m = _MemImage(v&)
    A$ = ""
    A$ = A$ + "haIkM6PTSS235M^TiBfGbIG_Ma6I516\AB4k7EmVTHkP0QP?PMji?oi?om?0000`SR]DfU1hHNmZofYA^f[FVRbF[XmSTAjW>cndolc?o7AmmPSY4g[9kb5l"
    A$ = A$ + "maIkSZCAG^OJf_WniA=F#FSoD\A6f_XWE#KKmimX^;Se\Ro:YIi;Te3MMZElO[_gMQGo[CFBDaMbH?Ik]E<XWnnXZo[:g5mWcdfE;UEMoYHO]VS^oOTJoBk:"
    A$ = A$ + "OODnP8]o_SinjoO]fl?TGc\7keZMGWl>6H[>MDb;=7Mo<[nNAdG\XgmY_?Vi0LDk_GJoJmnS`cfO[fgS>_7]7bHnIk_KUOeBW9_>cH5UhMI\_gnlEanUfM;k"
    A$ = A$ + "7eJM\638bml_Fm?:moFfOfU1[nf5]NYmefeWaPoKheO9bjZEmg[nQbjF_coa[a3\dnUn1_lmjjF[fO_R1N[_oNn^FOf_H_j]]7MniGFlEoicmlimL[ZgnonJ"
    A$ = A$ + "lLOPZUldWOT]SZ<dJ=#AYoG\Ud^AioU[a#JobJClffAKoBO?Mi#WdffSm0XV][E6l8^kmhlk][lHnHcmkc]L>gFjONDFf?VK]mRcgm2?cfoR?hcjlkH0oSmJ"
    A$ = A$ + "GomFoGf>KmnIgF[WKeAY?WCV?c7g:iM\Wfo[WCD4U1Y^S>N<Bmo\foSl7oY]mmHmoeR1?:n?Rm2_UmmaogNmoNf^K=o?ikmL<?K]omSe:m7NFoOkce[9dom0"
    A$ = A$ + "bJ]VbSiUM7=UEi`_HoGomcnLOZo9S9mb78g3l<fkogfnMo#_Kgo\mhcnoAk3R:V_MK#LnnJS1nkkS[=8choE`nbHPXSm\\M4UQ\eoOG>f7k[k34U_?jaOUkU"
    A$ = A$ + "ManbbbFbkWkAmn>:mmbSkU]UYJnoBIakh0_[_mj7RZo_T?k_7[n_U?8jWcjEag[K3RN>0A7o_:fG7oWAM?jioTinoGcNe:?A4gUaH0IJoNdomL^7eJceYXd2"
    A$ = A$ + "bjgh[e_cUX;7AeO[6I<nWEI83K[mmIe6Tm_am\Sk]dNR\^WAlGF?oOF]1JoOTnn\6oE?g_873dJ?8Ta3A]g3jkgUNn7geOc][6IYkD8;mGhiB]Hn<j;TeHMF"
    A$ = A$ + "c18J]oEI>`AcCEoGG6d9dm10lVFJ<?1mWgeeWmOoKbT\^oWbOGMFcocjg:dMZn30l\IUFo?l<9[koPDo_lnRfKTjoFnP\KC00N6XejAk7N:8eiU_6Yf?0000"
    A$ = A$ + "4?jkm3g380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PXie[ofme:C[#I"
    A$ = A$ + "NTbN6i9000`ZbVNG_JN5MO?eoeYN:7GAc^lMSX^1000LE6Ag^gljeon?mLmN[ogke<3=kIVG0000A`KMk[=GPNdo]Bc^nd[=VII9Rj5000`<IC_nGlGoGRgj"
    A$ = A$ + "oSLmolc?Gf^KiaZXkcl#087XO7l]ADjo[djoUGOTjoN[=ch?7g>EhKf6OkTMLjZ\n30F1^jL0>cjomhiTO;?o6FoODco9[hYEU8eTAo_>I7SjQm;9JgGGR:V"
    A$ = A$ + "kKKlg8doe9?eok]om<67HTl`KmI6oY=Xo_6Tmm;c;kCo_e6do]YVnO_?OPO[[oGfFMVf\cnmbJlWWnnB;[kNh7l>o_;Pn?LgJkoVS1djoJMoFc3#Zmg[no<o"
    A$ = A$ + "]7>Sle:=be?Zm#o?7#oO=0mO8kfN_Jo_J<#=]fImKecfV_>Dc_=m[m;[;c^nOEOcAjjGEgG73fZ^gClQEik8moI6g<Cf:KKa#UGKMM569VCoMmBoo:iO?aFc"
    A$ = A$ + "8n;KkG;noKgn7eoKElo[XmeY[NMmJ_IEo?KiiXeM[_>miVal1do>0mDk_EIn<eoNbgc63:K?KM^AY7moNl?FUo[XoGdO?:?:GgERidi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W>UH3m[[NNo]`8?gMNXCk"
    A$ = A$ + "el:0h>aZXoo]D_V=NL_go=OGkmM?Kdo>iVY_bclnKQNGo?jo0T3jdZW_g=fBKSAiUo_TgIG?QW7mngn^2cZ?#9MVoF41`C2?eXAo7o?0]#[A?;mO[l60H?Xo"
    A$ = A$ + "Po7P\X\>M_RoOjo><1000FA:JcNYokEN30000000000000000000000000d7bo6:m4okY4000`C3kooZTonF3000L7YU^?Jo0000g?foo?e]W70c50000hN#"
    A$ = A$ + "ioOZK[oonlIGN1000Pi#?[k_<7P\;[0000`lPml7000hi#O[moI=GP\ooc#\?f7kWWmcN_>cno?ebno?3cfoW]mS<nO5_ooIgo?knOHO\?f?CmWLG[C6So9m"
    A$ = A$ + "gJk7MKaVFCfco83kGRk:aoA77NdJnSJ>AIgoo9KoBOo<G3`CfoSmcgn[PnOTeOIBnI[ciYoF^NCYnGD]5e\O\f>nmNO5fgomk3Aao_oHNG6ZURXm?KkODj^G"
    A$ = A$ + "ocfnjTL>H?1oo:4oUiml\dNGke<mmNf6DlajT>n?2=`\Rmd[k_\6\8f7PEino[elgZkjSiIK#6anHO\O?ffcbPNLfSBN\_dmF6l\=8ceoD6W;ci0XK?Rkn?g"
    A$ = A$ + "O\WWJPOJ[m7dkh>Y=oDooUKaQmYkkkmoG_>oFhEkP>5mj_>:5]mc^noT\_EbBCd3KGCk]eaSZ<4Am_PmHNaYoOTfO4jaIigk=n;2mom?;L_g;JOSkN]CcG_?"
    A$ = A$ + "0_G?lL;7mngl_mc1HnJ`FjlUjMDjoJO^nmNf7#JO[nnAJo\[oFfgKK_jeO?]_NLfJfGNN?;3]\_WnoS^oSNKkBmebngmeo;G3L]foHf3lJjQnen[eo[5oiWn"
    A$ = A$ + "o[MnO;kk_oo]MZgnkOo`J[3aCKRmanIKOmj>d9iicdnNj3TS1ZCA\nO]F_leW`codAnOoK3bjNolicmXL=ooFomIoo;aDjmj87oO;k7CloCMloEbnA]_g[Jm"
    A$ = A$ + "7k7_me[1EWlN\_gU3kW3PXlobfQXFo_^=8;ooZXo;el;a0b[ckb#=oOdjojg7]nOTkm>fohk1LdnP<7k=cj]EkO4US<]_eHOjeR4ahObjMdaQBKHicSX<Hg>"
    A$ = A$ + "4il_REkGKcBLWmmRbSeoKO_>\loAhCbjn_E8[nNHOKmo<d2cBo=KkWml_bdn]FkC95QnO]nON_FLMZemR9jfQXdneUQ<VgQdg;OV0:nQIFNTjmjj\fo_oJmo"
    A$ = A$ + "g1`Nk7_nOTalHoff>kbADnN]mcJ^OIikAo?oeoG\Sf_7IO1ijPS`_G;Fhn[o[oknkW?7PBkZW_POnRmm3RBkOSW\nk:Ko<;3AIgE`n[JkO4ffJ_?;Yhd1bmn"
    A$ = A$ + "oGBF[o?^fPLlmjb#FggQO[cfkmo\:?beDoil0ndoG\[L?0lcGlijoS\mGn\8Wac1c:HOI:Kk7ihOF]1AKKY?83k_2aOIJo8o=7_Rf?;\f3jXeQ]:;iDo]ooT"
    A$ = A$ + "WXlmFno8W3lC<nOUH5dob^<T=?ij>ll`B3:;moeXnoimU?3onniS4oL0b^M1000OiY[oOT?87KojSi04W_0]O00hYaCBc_FM?gmMock3Afn5000000000000"
    A$ = A$ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000PeRG_NUNI00000b1V70"
    A$ = A$ + "000#\XCAIg==o=niWO<O=Ko2000`MU=MFM::]gJjnN[o_EUeDkLNk3dci:niPIGoSbnI`8aFAdG8[iO3`:#dSi2oBA[?JmoFJnbGmafOZmgBogkHb<eo?Zn7"
    A$ = A$ + "YmSdWGR_e_NdilP]hl=:YbWSXm_P<N;JK_Jf?SiNWEo_\9[nojfN[dM_mGZeKQ_eKdoe]3enL4aNI\o77eggCkg:N?jn25]Oil0RB3D>_SF7k^Jo=NZmoTnj"
    A$ = A$ + "N?^Weo<V3`AYkLkOFkkoEen_jhbXoOL<fZ<70?m1ej[7iH0K8ek:9doSanbfkJOf;:aho>^knaO:7k^Zog[f_GnPNCU[e7O`[>dO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YO]^oM[ci1"
    A$ = A$ + "S4?hIi00000n>iO0JAWJ%%%0"
    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
#6
Thumbs Up 
(11-18-2022, 04:44 PM)James D Jarvis Wrote: Version 0.2 ,  I added in difference of size for height and width and it creates a much more visually interesting sprite sheet.
This is very clever, thank you for this!
Reply
#7
output from a run of version 0.2
[Image: image.png]
Reply
#8
This is awesome - nice work!
Reply
#9
(11-18-2022, 06:55 PM)james2464 Wrote: This is awesome - nice work!

Thank you.
Reply
#10
I couldn't stop myself from working on this a little more today so here's version 0.3.  I added wings and accounted for them in the generation. 

Code: (Select All)
'Mini-Monster-Mixer v0.3
'By James D. Jarvis November 2022
'This program uses BASIMAGE coded by Dav for QB64GL 1.4, MAY/2020
'
'generate a sprite sheet of monsters
'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-Monster-Mixer v0.2 created by James D. Jarvis
'
Randomize Timer
Dim Shared ms&
ms& = _NewImage(512, 360, 32)
Screen ms&
_Title "Mini-Monster-Mixer V0.3"
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 critterbody_type
    head As Integer
    arm As Integer
    torso As Integer
    leg As Integer
    wing As Integer
    k1 As _Unsigned Long
    k2 As _Unsigned Long
    k3 As _Unsigned Long
    k4 As _Unsigned Long
    k5 As _Unsigned Long
    k6 As _Unsigned Long
    xsiz As Integer
    ysiz As Integer
End Type
monster_limit = 40
Dim Shared mlook(monster_limit) As critterbody_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): kk5 = Point(0, 5): kk6 = Point(0, 6)
_Dest part&
Line (0, 0)-(0, 6), 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 monster_limit
        'create a new set of monster sprites
        'included image source has 16 options for head,arms,torso, and legs
        mlook(m).head = Int(1 + Rnd * 16)
        mlook(m).arm = Int(1 + Rnd * 16)
        mlook(m).torso = Int(1 + Rnd * 16)
        mlook(m).leg = Int(1 + Rnd * 16)
        mlook(m).wing = Int(1 + Rnd * 86)
        'generating new colors for this specific monstewr sprite
        kr = Int(Rnd * 150 + 105): kg = Int(Rnd * 150 + 105): kb = Int(Rnd * 150 + 105)
        kr2 = Int(kr / 2): kg2 = Int(kg / 2): kb2 = Int(kb / 2)
        kr3 = Int(kr2 / (1.2 + Rnd * 3)): kg3 = Int(kg2 / (1.2 + Rnd * 3)): kb3 = Int(kb2 / (1.2 + Rnd * 3))
        mlook(m).k1 = _RGB32(kr, kg, kb)
        mlook(m).k2 = _RGB32(kr2, kg2, kb2)
        mlook(m).k3 = _RGB32(kr3, kg3, kb3)
        mlook(m).k4 = _RGB32(Int(Rnd * 220 + 33), Int(Rnd * 210 + 33), Int(Rnd * 200 + 33))
        kr = Int(Rnd * 200 + 33): kg = Int(Rnd * 210 + 33): kb = Int(Rnd * 220 + 33)
        mlook(m).k5 = _RGB32(kr, kg, kb)
        mlook(m).k6 = _RGB32(Int(kr / (2 + Rnd * 2)), Int(kg / (2 + Rnd * 2)), Int(kb / (2 + Rnd * 2)))
        mlook(m).xsiz = 64 - Int(Rnd * 32) + Int(Rnd * 4)
        If mlook(m).xsiz > 64 Then mlook(m).xsiz = 64
        mlook(m).ysiz = 64 - Int(Rnd * 32) + Int(Rnd * 4)
        If mlook(m).ysiz > 64 Then mlook(m).ysiz = 64


        draw_monster mmx, mmy, m, 6
        mmx = mmx + 64
        If mmx >= _Width Then
            mmx = 0
            mmy = mmy + 64
        End If
    Next m
    md$ = "Monster Sprite Sheet generated " + Date$ + " at " + Time$
    md2$ = "Using Mini-Monster-Mixer V0.3 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_monster (Mx, my, mid, scale)
    'generate a monster image from source sprite sheet part& and render to the programs main screen ms&
    tempi& = _NewImage(32, 32, 32)
    'tempi& creates a temporary one sprite image for rendering
    _ClearColor clr~&, tempi&
    _Dest tempi&
    Cls
    hs = Int(Rnd * (scale * 2))
    If mlook(mid).wing < 17 Then _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).wing - 1) * 32, 128)-((mlook(mid).wing - 1) * 32 + 31, 128 + 31)
    If mlook(mid).wing > 16 Then
        _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).leg - 1) * 32, 96)-((mlook(mid).leg - 1) * 32 + 31, 96 + 31)
    Else
        If Rnd * 100 < 67 Then _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).leg - 1) * 32, 96)-((mlook(mid).leg - 1) * 32 + 31, 96 + 31)
    End If
    If mlook(mid).wing > 16 Then
        _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).arm - 1) * 32, 32)-((mlook(mid).arm - 1) * 32 + 31, 32 + 31)
    Else
        If Rnd * 100 < 67 Then _PutImage (0, 0)-(31, 31), part&, tempi&, ((mlook(mid).arm - 1) * 32, 32)-((mlook(mid).arm - 1) * 32 + 31, 32 + 31)
    End If
    _PutImage (0 - Int(hs * .8), 0)-(31 + Int(hs * .8), 31), part&, tempi&, ((mlook(mid).torso - 1) * 32, 64)-((mlook(mid).torso - 1) * 32 + 31, 64 + 31)
    _PutImage (0 - hs, 0)-(31 + hs, 31), part&, tempi&, ((mlook(mid).head - 1) * 32, 0)-((mlook(mid).head - 1) * 32 + 31, 31)
    _Source tempi&
    'repaint source image with generate color values for new monster sprite
    For y = 0 To 31
        For x = 0 To 31
            Select Case Point(x, y)
                Case kk1
                    PSet (x, y), mlook(mid).k1
                Case kk2
                    PSet (x, y), mlook(mid).k2
                Case kk3
                    PSet (x, y), mlook(mid).k3
                Case kk4
                    PSet (x, y), mlook(mid).k4
                Case kk5
                    PSet (x, y), mlook(mid).k5
                Case kk6
                    PSet (x, y), mlook(mid).k6
            End Select
        Next x
    Next y
    'generated image in tempi& is rendered to ms& as a 64 by 64 sprite
    If mlook(mid).xsiz = 64 And mlook(mid).ysiz = 64 Then
        _PutImage (Mx, my)-(Mx + 63, my + 63), tempi&, ms&
    Else
        tx = Mx: ty = my
        tx = tx + Int(64 - mlook(mid).xsiz) / 2
        ty = ty + Int(64 - mlook(mid).ysiz) / 2
        _PutImage (tx, ty)-(tx + mlook(mid).xsiz - 1, ty + mlook(mid).ysiz - 1), tempi&, ms&
    End If
    _Source ms&
    _Dest ms&
    _FreeImage tempi&
End Sub

'================================
'PNG file saved using BASIMAGE1&
'================================
'EXAMPLE USAGE OF BASIMAGE1&
'===========================
'SCREEN _NEWIMAGE(600, 600, 32)
'pic& = BASIMAGE1&: _PUTIMAGE (0, 0), pic&

Function BASIMAGE1& 'mparts32a.png
    v& = _NewImage(512, 160, 32)
    Dim m As _MEM: m = _MemImage(v&)
    A$ = ""
    A$ = A$ + "haIkM^PUSS325]gTICFKb<CVJD7<6#X?0>a?M>g^Zh?P42YWTCBeoi?oiiO0"
    A$ = A$ + "00000g:NEZ^>0jcS7nkW6iJG]>UU_^Rn?C6ILj>7Coc?olOTem1jC;_WCee;"
    A$ = A$ + "`W7c>6UGb^NOgl_WaiI=G#EcodlA5n_YWePkKniSX]CceTboJUM5;X]3NKb:"
    A$ = A$ + "ogjnnFhao6TYTEN7=gSfO;U36I\?[foEU_5mWIjkd:Eef_;nW[i`7oWYf?e_"
    A$ = A$ + "dO?[H#VnogiLOlgOZ]n3je\kiNUjgiUXc1NeVjERBcQ?>CJ\G6S5KjMWSmi\"
    A$ = A$ + "6PNmoAYmcekkATmoBm_m>O4m7dLnM7_]\WFI6K=cL5]lMJ^Odal[RoKmkBn?"
    A$ = A$ + "[mj8=7#V?cO]fOFjoFnOge1Yaf=]NZoin=ViPOVNkW2]]:enSJL8]]iMm?A="
    A$ = A$ + "OPTf?=>4E\Wgf\joS:7h]nnkek:mjhbmdkKkMnmGGREoilclimJ[dkoOO=NO"
    A$ = A$ + ">#okM=EkGZ4I<_W_cZ>H]7X\doKnRjg\RodmH#mOK_9Akk\mOK\7_N`;LO7a"
    A$ = A$ + "c0#cgJeQ8bkN??oAoB?F<nlhciV^VK9m_8Z;7WcEkIa5kc2_bnoF<hLKnM>#"
    A$ = A$ + "liNf]oXeoYmcBon^k[i[]ZGilJb\[C?WX?C[4M^7?ncGCD6e1Z^3?O<CmoZN"
    A$ = A$ + "n7e?oS]oSHooJiPmbochIQKioHRofko?bnMYeoAom8go[\foaiJYaS8Ko_Si"
    A$ = A$ + "lm46oc0BJ_VdS5UO7]DEm8^Lo7???Vk\n7=W<ZH0mIPGacno]_O?><jnmcm7"
    A$ = A$ + "W7oWM<8[LNknPlRmJc1nk_WGO#UioG1oCc1b>gCbgID7ZFooMmhH^?O<#Fan"
    A$ = A$ + "\WoUn\\KnWFGNERncm8oi>BSmdS7U_Y5]hO[^4MN#d]G_aQ\6oCilhmLeoUR"
    A$ = A$ + "1Ioi\nZ4kim1I_6P\co_:nWWoGAK?keoDicoGcOJeW<bkZH>P:m_7mo8GkQF"
    A$ = A$ + "O>_TUF#EO7OUnN^TMm8[aKJDalOBeQ:l=?fGEO#eO7g[>_GBk9cfN5iOEmio"
    A$ = A$ + "CZ?P7oc<fGel_lenUiLPB?32Jn#F?k1nkg5Om7O[OWK_JDU^CSZdO1gGdbi["
    A$ = A$ + "H\#Ece9]6P\en_:[1>K^[jolj0_0MO004=FJ<g1mWg]ekmOoKZTZNo?YO_jT"
    A$ = A$ + "FoWdgEX_Yf?00^gLUfo?hNBE_o3Dmof_gdNcDoG:6DMO200^7`ejQf?h^0EW"
    A$ = A$ + "Wnc<en100000i3omn1_7#000000000000000000000000000000000000000"
    A$ = A$ + "000000000000000000000000000000000000000000000000000000000000"
    A$ = A$ + "000000000000000000000008KNlhYk[UF^2eiAZkEHC0000P[:_dklZiedmS"
    A$ = A$ + "DoWGlD?FAc^M_Idf00000FUAd]mJ[7okohijSFogke\3=kMJ;0000P<h]^mJ"
    A$ = A$ + "[5`Sn_DIg]7_nHWeU<JG00000kTGjeoBljoDRFoOT[oWOnIIonb6G5MO\>40"
    A$ = A$ + "X6`h>`W6IYoOUfo?mjcDo?J]I<oConY6ObnhCWZcC_:ko00^2\jJ0VIooAli"
    A$ = A$ + "ToU=o4foOF[oYZlY[:IZ93mOMZ>7=2og:XOojBFiLOJcoVQn?_4Yn_gagkHN"
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[?OCFkoIUeP\J<HUk_baOBJgcdf"
    A$ = A$ + "We6Nn\n=R]6mmPO7Jolfb:jo[ffgeW9R\hCD_lKRM7oK[W4n_nnfN\SmmOfV"
    A$ = A$ + "Smg`_Mml7Tlo<[1IeHiXgGeiOljl:jo[HSMfn7EkMWaoNOVl\^WMikZRmc0d"
    A$ = A$ + "oo^RoS<oC4?_TAONFE?oKE\KMggfeWnkiWkLM[1YB^JiOk#o_BlZ1^kmnCmO"
    A$ = A$ + "4[[hK5XooM5oQn?doedoeO_kgkNFfeW7a<h^Vo55SlIW5joebWfkGjg6A4o7"
    A$ = A$ + "aVAeg?ZnO4n_jnfN4YnXU]?Z=7gc[Tni1XjH]ENBUSon6ITg3lM[mC[3#k_?"
    A$ = A$ + "A\o?#maOXooI<gKdjojW?_gWb[jk7:]4eh_?Ul`MbXOoIQn?0D3E[oOggoEE"
    A$ = A$ + "jogMJi6lONe]mW2Sli^;2MjXFG10l=aEAooCYM]KRhmNoGkN]O^kE3ok9g>S"
    A$ = A$ + "EAJk?5l^oOXo30e0_Le]kg6_:_VS:ZhOcfEg>1g?lngn^6kJ<#[<cO;R0Pk4"
    A$ = A$ + "AZA3mO4o10;hJdkBoGbf00h8#o1aO0X:JkC?Zlokng3C0000P[8=]iXdoSbf"
    A$ = A$ + "00000000000000000000000000000000`7do6:M7okY40000`M3iooZ4om]6"
    A$ = A$ + "0000hK4;MOXm30000lmaaooYfNM0H]000000O7dnoWJKmogW_jj;00000H?h"
    A$ = A$ + "IOo]e0DMM500000\?`cl70000hnP_mnO_F;#eooI8l?l?lOMn_jWeIeooYFe"
    A$ = A$ + "ooIHeaoZmOVioGagooZ7oGmh?hOhOho:eOZM_>E<o7=NcmOfm5_dJZNm7Eho"
    A$ = A$ + "FNG;o?kl`Nki?[e4Emhok\oKSm[L?0gih?lOmno:XoWIkWFX_FjLA6_YkgTZ"
    A$ = A$ + "oUEOQVocegio\g_2?goS?7RFlohaR^>XEbXo_Jog[l]gn[fol2M=HgQhoE8o"
    A$ = A$ + "[bgccFo]f?[<f7IO#;6c;llo<d0[:gS__ofN`bhi0LENooiJn_JklS5IO#5i"
    A$ = A$ + "n`o`oNlMTe1nl\m:AlLYmF7R\?XbmodVW[be0`k?bkmOfO^GTJPWmea36MN7"
    A$ = A$ + "eWWeoO4FNX?MoHOooikcgRXj7hU\goE_Bfn_jfoMboB59=a8l]Vf[eacZ>TA"
    A$ = A$ + "k_QlLNiYogCk?3mhZRkNcob#oohW5^g?;jHckNL#cWoL0N_OhmF?lngl_S[1"
    A$ = A$ + "HoJ`Bjl]fMFjolH>ogSL<0eoBSmcdoEgnUlOdnnZgnSdoliIel?mlAF7\lOT"
    A$ = A$ + "aoN_oSAkkFkEboOkkoW^7H]noLN6hJjQaeoceoeboRCooaQh_ToS?nof?jmo"
    A$ = A$ + "a?>DKO8AjChOhoZm?OO7l2mlEjo8S1di0iU<fo?G[Wnck`WoYNaohk3Zjmni"
    A$ = A$ + "lWkAjNno]m7cco_UCaOF7e4o]lO>iogeio_Bn?[WkmE]m3oW_oik1UGRN^_g"
    A$ = A$ + "e3i?70I5oYm3I]oONO#Eao[Rn?Ec_U3#_^X[3Jao\eoioNfjoIn\gQokoN0W"
    A$ = A$ + "M<XbiN[\M;eoWAmXBo;=g7O_8I<o7]MWMN8e7Bal<Z3bm3I^n[Lenin\Ug9o"
    A$ = A$ + "NA5anoUO_>TRoI4CZjmO[AESmPoUeo[#;\:mgZmOe[oZBoK]gWF93mO]aOA_"
    A$ = A$ + "GLNajmR9knQ\dnieQ:Fg1=fCo<1dR3k\n#eki]INlohe6og3PSn?Omo<ciQo"
    A$ = A$ + "]mMeeS\RmLoGeJoZ:f3mojgoOc?lhNVS5Xk3>Sh^F^`g_n?o_k_WoL0Bm;Om"
    A$ = A$ + "2a5;>>>8;]oGLWeO_bn_bj#Fnm:ho[JoO6nFjIOf:iY3DkkoO[8]oolj3Z9f"
    A$ = A$ + "c[3Emn>lKKFnIo_[j3M?eWG7`ihOc_dW1#LaRcko?cnOjW5i:nL`L5l?]D]o"
    A$ = A$ + "cLn?YnP\m==6DQo_2iOEjo<o>7O5mOE8m<XcF7FZ^DCkGnoCNb:f;5ocL=`g"
    A$ = A$ + "alo[4G1m_Z[3EcM^]3^O8Y1EUnoeXmOnmU_RhnaeSToJ0Z^O1000#\Lgeok5"
    A$ = A$ + "3Zag?>]6PlR5#k700Pk6g9=O]fN]?gmc_?4E7G0000000000000000000000"
    A$ = A$ + "000000000000000000000000000000000000000000000000000000000000"
    A$ = A$ + "000000000000000000000000000000000000000000000000000000000000"
    A$ = A$ + "`eR7?NDNM000000D3HM000000i2_TUOOYioROni7aOFML10000hKUGj\lBFJ"
    A$ = A$ + "_JjnA[ooZ9cAkLA73h[i:oeP9gncboE`8iFI<FXZeO30G1bN>G`_ddjcFogB"
    A$ = A$ + "cWncHlmI]O;moXc9[Do_Gk?CoWI<_UOcoI_c51_bcOA[dNM6mo=XiKIkk[Vo"
    A$ = A$ + "[H]gE=n[JZJl?__GZl]goCejU8ff=doim3J_>SL_:Nn7m6k7Yo]bgcN\#CkW"
    A$ = A$ + "^>P\d0Y[k`jHO[no5geaOdH]gS7Ik_Re0d[l=goGecmOE]oEWG6jomca^:[1"
    A$ = A$ + "8bHPfHm<W3h5Dm^F1joihOJo]f[SRF>n_ckNLnWfanFeomZm7E<`KYM]a43N"
    A$ = A$ + "h#oIoja]B5kk_e^WmmmO7eCJ\]Rh_FoQf[gOlggH[X63>jHo86ogFk;mWN>G"
    A$ = A$ + "4Dico_JmgZmo;bNlgkl\kUn?GG]M<]alBm9kZ>A7[YEhW;ZnoNkoL_nllNn7"
    A$ = A$ + "]m]jLCk#kGjie^B\?[h_FNHTijF]mMN][FGb#gG;G2?oOXo[mj<l_WS5Ilgk"
    A$ = A$ + "aSZ=Z=^Oga6NY=VCSIe8m`amPbWoimif[?Ueom>7g>fKb\OFoYc7g^WEVS^R"
    A$ = A$ + "h_FnXdn?SJ>PAeFSIMXeon_X=f>balBDecoGKo=deP4MkgboI4kYe1]GWQom"
    A$ = A$ + "L\\kogILPK7[G?be>CmPZ_c?>_o?be1hki?_OmoIO^odHg>bm6mcjg>en[:n"
    A$ = A$ + "[5GcLnWAJGI^oo\lI[_oEi:lloO1oio7]oJnT>oVDM9JMXNn?Sh#fSodjkYn"
    A$ = A$ + "?ceoY5ogajodbS\N]W[MVn8;m;J<Gbfle1\ShO5_oclmokenSNmST3jM=5JJ"
    A$ = A$ + "oc_gO?koLO?30===_co\C=aNJ\iX1GgkobEjioo2ncM<JoAm[D^F6kmo:hoG"
    A$ = A$ + "8iW<eo[doA7oKfHgjoS6S\dnYW_mkJaT8NF0Ifo?SnO[4gg7?O?7PFlOgc9W"
    A$ = A$ + "KlgW_ddoSXn8Ig<Nf7FJlImlG^2j?dnl\mIe]oZmO;^kiHOSn?kh_V^9meBW"
    A$ = A$ + "Kea6FjGLm]NkcOg[C?KmO>J]EJLakcXOUjUeNPfQf_EkdkaF=7LEmo8b;ddO"
    A$ = A$ + "SZ_FZOekaS`oG1m7NAZoHg[7bbOkH>GhoajgkMl8X2mOn?]JoBgc<nDjmkWG"
    A$ = A$ + "XW?[?C>BjMAoL0i5[_C0SlicK78]>PM5;T6?i9ocjno4lo<kaFkLkD3bZ_=S"
    A$ = A$ + "W5^FL^giR\NXEfmJoT:dH_fiRboSNn8KoFWKWnGjWm>ggBlG[]6AkfBk_gL#"
    A$ = A$ + "d[;Rf_dN[cHof_`jc2HV_gWJe=nWA`MU_YE6iJndl_dWg1__okAlnagkml9R"
    A$ = A$ + "nN^mKS[iS_]>G4<Bn#Te3000000000000000`H8m0D[`>kjIgVaW9K`J<K>f"
    A$ = A$ + "WRon4hO3:7hCcn00HN>XEC7[>Qf]UMT\WfWI[MZo;iSNGoZeQI\5ONbEV[L7"
    A$ = A$ + "fJf?CKSLOJiGkHmWNlWf7LPEcmlJOYnYMZAfcnBnJGe1=kPe000G7>YGcd^g"
    A$ = A$ + "V]4\WddS_^^MYoB]Ug?3i[^6PI\UE<Khnc=I[XeoedKgicOZga5cGg`j0DGC"
    A$ = A$ + "=K<0gOl[OJoK\nK9mO_[=H4o;EGFe^00HO#WCPZI^Cmo3fEiI08ioEeOUlO?"
    A$ = A$ + "]ONIdj#?k8I;aiYWDgfB;CbFFJeAXoC?gO[CJJbCX1OX]b]I_S_Qe1HZk;eF"
    A$ = A$ + "MdO=Mo_SlYNfNFogkJlTk>JNgZfCkId<]o7dNEkoZi76G=k5=lB6fS?g#Djo"
    A$ = A$ + "FfT[Ec_gAKgBf`bNJJf]bXjoFfY[n_3=KknL5KXH;jO33>=nIR_GkNnNbgn>"
    A$ = A$ + "bM8GAK?i[ToidVZJeCD7VaF7j_hmM\m[kZoGhn]\EkHBeGjimjoI\5?gLdln"
    A$ = A$ + "E]gYe9]XViXfC[oOIokL]dI\n0;OddXKa[Ee\7eNcXc<:FnPXBlolKIjH]Ck"
    A$ = A$ + "eb?>T^4Pno1K;Xog>WTfmXj_JjoBfZWfooMW>[3cH;nl3lHo8[1H6KAooY8^"
    A$ = A$ + "V]eJ3D7gadhU>n1mOQiW6IN[CiNCH??JfNZ3RamAeoUHfnO5K9MON\[GogkJ"
    A$ = A$ + "lNONmkZfC]OKB=hA]WhJ5fUoM^6TA?N?o?ba?XECZ_c^60^fOcVFfCKnmIFG"
    A$ = A$ + "`XfRX>`hgbhion]W7moAb1VAo_5KXG;oN79f;Mo]OGoje;YYoKXmdK^#][oT"
    A$ = A$ + "]4\SfJ0hom=\kh>beBeo]nkQ\YV]QVIgL_1F;QGMK[ja:f`cm\UnO7jRJG_G"
    A$ = A$ + "o?Z=6a^^b16dNMSGc<oG_aP?jhOWJf^l_T]=63hmhml_gSOB[VEW7M=0JJom"
    A$ = A$ + "\WfLlcZohmh4U15n]h?oO<k]jlNRmcFfcHnLYe0#CWm6ke\SemHElD7>jknf"
    A$ = A$ + "jMoEWi;LX1XMMFfiLmolJ0\Nf0RSm4dimlo52WZgBcQe97Djj7IND_i]C_n1"
    A$ = A$ + "SlnCi1:]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g>[XQCD"
    A$ = A$ + "HLOoWloo?_0M_hFJoWdoEd]JL`^GXenaABc>;K9Zo_Sio_jjomFCiPi;cHCA"
    A$ = A$ + "]j9en?HC5kZfg_1]OaL07joBcE`_6_nmDMPIc[FN80D9ne`?Zm_]kg#WgcLR"
    A$ = A$ + "Z[1`imOE#JkBIH;AmjM=oo6F?AHim:k9OVmn;V;Z]>eNjoK:?EK<PHOe6en5"
    A$ = A$ + "c[VLoocD?R`V0`g<bUSjfBJgbgoik[kmKll7Y7cem[]gS;\fo;fQ^o<fDKmJ"
    A$ = A$ + "[WC5SMg5Ji5[V_<ZMGIm63EOjYo7Do3O=PlcacEhWKFO:U7^ZM1Pk0Ne]gem"
    A$ = A$ + "Mb>CZKo9YgOE8Jmi[ZnO;OAkh[ZokeOIT_JiS<jKdlQV?gej?Sbf0000n\9k"
    A$ = A$ + "e8ReT:4C6lm4hZHK00000`lLWOnC00000PLiOdR\%%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




Users browsing this thread: 9 Guest(s)