Message to Fred

For everything that's not in any way related to PureBasic. General chat etc...
Olli
Addict
Addict
Posts: 1256
Joined: Wed May 27, 2020 12:26 pm

Message to Fred

Post by Olli »

Between the 24 September 2014 and the 31 December 2014, there is a strange absolute hole in the wayback machine.

As strange as there is several of my source codes I wrote and published in this period, in the french off topic.

Could you search them ? And move these subjects on the english off topic ?

One of them : kelebrindae goes back and thanks me.
An other subject interested PAPIPP who has returned (also in the off topic) a second source code.

End of period to 23 september 2014


And here, no right page #6 and more (older) are corrupted. The oldest date is the 1st January 2015


Result : all my source codes (from 09/24/2014 to 12/31/2014) there "did" not exist :shock:
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: Message to Fred

Post by BarryG »

The Wayback Machine has nothing to do with Fred. Why would you ask him to do such a task? He can't access its contents any more than you.
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Message to Fred

Post by Kuron »

Wayback machine is nice in theory, but it is extremely difficult to ever find a complete and usable capture of any site. It can take days or even weeks of looking through the listings for a site to find one that is actually complete.

I wish Fred was in control of it, it would be far more reliable than what it is. But, it is nice for what it is.
Best wishes to the PB community. Thank you for the memories. ♥️
Olli
Addict
Addict
Posts: 1256
Joined: Wed May 27, 2020 12:26 pm

Re: Message to Fred

Post by Olli »

Fred has archives of the datas. I thank the wayBack machine was complete anymore, that is the way, some years : nothing does not miss.

But, strangely, there are periods which have disappeared. I bring the attention, these gaps are not due to Fred. I think it is due to the several laws about GDPR.
Olli
Addict
Addict
Posts: 1256
Joined: Wed May 27, 2020 12:26 pm

Re: Message to Fred

Post by Olli »

I'm struggling, trying to re-build the original source codes. Do you understand the concept of a cone of light, as clearly as the original code? Me no... I'm struggling...

Code: Select all

Structure gui
    w.i
    h.i   
    color.i
    mouseSprite.i
    mdw.i
    mx.i
    my.i
    widget.i[256]
    lap.i
    lapIni.i
    scale.d
EndStructure


Structure clock    
    sprite.i
    x.i
    y.i
    w.i
    h.i
    time.d[2]
    *gui.gui
EndStructure

Procedure.d getDistance(x0.d, y0.d, x.d, y.d)  
    x - x0
    y - y0
    x * x
    y * y
    ProcedureReturn Sqr(x + y)
EndProcedure

Procedure clockCreate(x, y, c, coef.d, excess, *gui)
    Protected *this.clock = AllocateMemory(SizeOf(clock) )
    With *this
        \sprite = CreateSprite(#PB_Any, 64, 64, #PB_Sprite_AlphaBlending)
        \x = x
        \y = y
        \time[0] = ElapsedMilliseconds()
        \time[1] = coef
        \gui = *gui
        StartDrawing(SpriteOutput(\sprite) )
        DrawingMode(#PB_2DDrawing_AllChannels)
        Box(0, 0, 64, 64, RGBA(0, 0, 0, 0) ) 
        Circle(32, 32, 30, c)
        Circle(31, 31, 28, RGBA(0, 0, 0, 0) )
        Box(31, 0, 2, 32 + excess, c)
        StopDrawing()
    EndWith
    ProcedureReturn *this
EndProcedure

Procedure guiCreate()
    Protected *this.gui = AllocateMemory(SizeOf(gui) )
    Protected img
    With *this
        InitializeStructure(*this, gui)
        InitSprite()
        InitKeyboard()
        InitMouse()
        ExamineDesktops()    
        OpenScreen(DesktopWidth(0), DesktopHeight(0), 32, "", #PB_Screen_SmartSynchronization, DesktopFrequency(0) )
        \w = ScreenWidth()
        \h = ScreenHeight()
        \color = RGB(64, 128, 255)
        \mouseSprite = CreateSprite(#PB_Any, 64, 64, #PB_Sprite_AlphaBlending)
        img = CreateImage(#PB_Any, 64, 64, 32, RGBA(0, 0, 0, 0) )
        StartDrawing(ImageOutput(img) )
        DrawingMode(#PB_2DDrawing_AllChannels)
        Box(0, 0, 64, 64, RGBA(0, 0, 0, 0) )        
        StopDrawing()
        StartVectorDrawing(ImageVectorOutput(img) )
        VectorSourceColor(RGBA(0, 0, 0, 255))
        MovePathCursor(4, 4, #PB_Path_Relative)
        AddPathLine(32, 32, #PB_Path_Relative)
        AddPathLine(-18, 0, #PB_Path_Relative)
        AddPathLine(-14, 14, #PB_Path_Relative)
        ClosePath()
        StrokePath(3)
        VectorSourceColor(RGBA(255, 255, 255, 255))
        MovePathCursor(6, 8, #PB_Path_Relative)
        ScaleCoordinates(0.8, 0.8)
        AddPathLine(32, 32, #PB_Path_Relative)
        AddPathLine(-18, 0, #PB_Path_Relative)
        AddPathLine(-14, 14, #PB_Path_Relative)
        ClosePath()
        StrokePath(5, #PB_Path_Preserve)
        FillPath()
        StopVectorDrawing()
        StartDrawing(SpriteOutput(\mouseSprite) )
        DrawingMode(#PB_2DDrawing_AllChannels)
        Box(0, 0, 64, 64, RGBA(0, 0, 0, 0) )
        DrawAlphaImage(ImageID(img), 0, 0)
        StopDrawing()
        FreeImage(img)    
    EndWith
    ProcedureReturn *this    
EndProcedure


Procedure guiDisplay(*this.gui)
    Protected *that.clock
    Protected.d r, dirt
    With *this
        ClearScreen(\color)
        For i = 0 To 255
            *that = \widget[i]
            If *that
                DisplayTransparentSprite(*that\sprite, *that\x, *that\y)
                r = getDistance(\mx - 32, \my - 32, *that\x, *that\y) * \scale
                dirt = \lap
                dirt / 1000
                dirt * 360
                r + dirt
                RotateSprite(*that\sprite, r * *that\time[1], #PB_Absolute)
            EndIf
        Next       
        DisplayTransparentSprite(\mouseSprite, \mx, \my)
    EndWith
EndProcedure

Procedure guiGetDevice(*this.gui)
    With *this
        ExamineKeyboard()
        ExamineMouse()
        \mdw = MouseWheel()
        \mx = MouseX()
        \my = MouseY()     
        If \mdw > 0
            \scale * 1.1
        EndIf
        If \mdw < 0
            \scale * 0.9
        EndIf
        EndWith
EndProcedure

Procedure guiRepeatWhileAnything(*this.gui)
    Repeat
        ;Delay(1)
        guiGetDevice(*this)
        guiDisplay(*this)
        FlipBuffers()
    Until (KeyboardPushed(#PB_Key_Escape) = 0) And (MouseButton(#PB_MouseButton_Right) = 0)
EndProcedure

Procedure main()
    Protected *gui.gui = guiCreate()
    For i = 0 To 255 Step 2
        *gui\widget[i] = clockCreate(x, y, RGBA(255, 255, 255, 255), 1, 16, *gui)
        *gui\widget[i + 1] = clockCreate(x, y, RGBA(191, 191, 255, 255), 1/12, 0, *gui)
        x + 128
        If x > ScreenWidth()
            x = 0
            y + 128
        EndIf
    Next
    *gui\lapIni = ElapsedMilliseconds()
    *gui\scale = 1.0
    Repeat
        *gui\lap = ElapsedMilliseconds() - *gui\lapIni      
        Delay(1)
        guiGetDevice(*gui)
        guiDisplay(*gui)
        FlipBuffers()
    Until KeyboardPushed(#PB_Key_Escape) Or MouseButton(#PB_MouseButton_Right)
    
    guiRepeatWhileAnything(*gui)
    
EndProcedure

End main()

Post Reply