Page 1 of 8 123 ... LastLast
Results 1 to 10 of 79

Thread: thinbasic Lionmodule :D

  1. #1
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    thinbasic Lionmodule :D

    chapter one: my "first dll test"

    hi dear thinbasic friends...

    this is no joke... from this day you can uses "lion" as dimension

    I am publishing now my first thinbasic / lionmodule script example with own lion.dll for working with thinbasic...

    ...more to come, I am very sure and be very happy to find a short and good way for me to create new thinbasic module stuff...

    any feedback are very welcome , you can test the mini script, it run's very well

    best regards, Lionheart
    all done in zip file if you like...
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #2
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    add some more infos here...

    my idea for a new thinbasic "lion module" should aim to a colour / paint tool...

    I add here a first colour pointer exe.example... how to use it with the "lion module"... I cannot say how to build it today... but this is my idea for the next weeks

    use arrows "up, down, left, right" to move the colour pointer...

    servus, good evening, Lionheart
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  3. #3
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    chapter two: my "second dll test"

    short input...

    ... one little "lion" (uses "lion", "console") update with three math. function declaration, as I have understood this new functionality of the module completely new

    good night, making a lot of fun to go step by step into quite new dimension...
    just enough for this night and I am very glad to see new horizonts

    script as followed...

    [code=thinbasic]'- Empty GUI script created on 05-28-2009 21:03:53 by Lionheart, (ThinAIR)
    '- test script for DLL handling with new lionmodule

    '-------------
    'DLL FOR THINBASIC LIONMODULE
    '=============

    uses "lion", "console"

    declare function hello lib "lion.dll" alias "hello" (byval n as long) as long
    declare function mynumber lib "lion.dll" alias "mynumber" (byval n as long) as long
    declare function Deg2Rad lib "lion.dll" alias "Deg2Rad" (byval n as long) as long
    declare function Rad2Deg lib "lion.dll" alias "Rad2Deg" (byval n as long) as long

    dim a as long
    dim v as long
    dim b as long
    dim z as long
    dim r as long

    printl date$
    printl time$

    a=hello 18
    v=hello 32
    b=hello 16
    z=mynumber 34
    r=rad2deg 16

    printl
    printl "Hello dear Thinbasic and Lionmodule users!"
    printl
    printl a
    printl
    msgbox 0,"Returned value of different math. example is: " & a
    printl
    msgbox 0,"Returned value of second math. example is: " & v
    printl v
    printl
    msgbox 0,"my lovely number is: " & z
    printl z
    printl
    printl "Hey all is ok here with new module try..: " & b
    printl
    msgbox 0,"..my exciting Rad2Deg number is: " & r
    printl Rad2Deg(Deg2Rad(45.0))
    printl
    printl "- push any key to exit -"
    waitkey[/code]

    sleep well, best regards, Lionheart
    ps: add all in this zip file and enough for today...
    ...and thanks to charles for some good advice
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  4. #4

    Re: thinbasic Lionmodule :D

    Welcome to the group of thinbasic module developers And thanks for the effort.

    Some things are missing imho. A help file with command descriptions. I suggest HelpNDoc. Very easy to handle.
    The next thing is that without Prefixes, your commands may collide at one day with thinBasics native commands.

    Michael


    Ps.: Mmmh, a module but then you need to declare the commands? So is it a module or an external DLL?

  5. #5
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    hi michael

    thank you for nice words... yes, I am on the right way... have a lot of good ideas for my lion module, but I have to check a lot of things at the starting point for "thinbasic/Lion" module to become a real unique module like "ui", "tbgl", "oxygen" or "tbdi", "tbem" etcpp.. I am far away, only 2 million lightyears from next sunsystem or another blue planet...

    I am just standing here before the mount everest and looking for a good climbing rout up to the clouds

    more next week, I am sure there will come some new input and then I will declare some functions or/and commands...

    best regards, all good for you too, Lionheart
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  6. #6
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    chapter three: my "third dll test"

    => "liongfx" try

    hi all...
    hi michael,

    Ps.: Mmmh, a module but then you need to declare the commands? So is it a module or an external DLL?
    I will create a own MODULE .. you can see it in this test example with few new commands... but I will not follow this way, just tried to compile it for thinbasic

    ..shows next a new example first time with own uses "liongfx" module... this time fully without any other libraries and have adept it perfectly from fbgfx example... wasn't so hard to get this new script, makes a lot of fun... ... the second step for me... to understand all this strange and exciting new module drugs..

    it was only important for me to make a test handling with thinbasic language and
    the timer function in it is old but fulfilled his task for this test...

    [code=thinbasic] '- test example for new lionmodule for thinbasic, 30.mai.2009 by lionheart

    uses "LIONGFX"

    liongfx_WindowTitle "LIONGFX: Test for new thinbasic Lionmodule "

    liongfx_ScreenRes 800, 600, 32

    dim x, y as long
    For x = 1 To 800
    For y = 1 To 600
    liongfx_PSet x, y, x * y
    Next
    Next

    randomize

    liongfx_Locate 5, 20
    liongfx_Print "What about some colored circles? Press any key to see!"
    liongfx_Sleep

    liongfx_WindowTitle "Press only ESCAPE key to stop this drug"
    dim CountCircles as quad = 50000
    dim ch as string
    dim T1 as double = TIMER
    Do
    incr CountCircles
    ch = liongfx_Inkey
    liongfx_locate 10, 75
    if ch <> "" then liongfx_Print "[" & ch & "]"
    liongfx_Circle rnd(100,550), rnd(100,360), rnd(10,220), rnd(1, RGB(255,255,255))

    Loop Until ch = chr$(27)

    dim DeltaTime as double = (timer - T1)
    if DeltaTime = 0 then DeltaTime = 0.0001

    msgbox 0, "..sorry for stressy moments, all is ok with your eyes?"

    liongfx_Locate 5, 50
    liongfx_Print "This test was performed in " & format$(DeltaTime, "#0.000") & " secs. "
    liongfx_Locate 10, 50
    liongfx_Print "Beautiful Circles on screen: " & CountCircles
    liongfx_Locate 15, 50
    liongfx_Print format$(CountCircles/DeltaTime, "#0") & " circles x second"
    liongfx_Locate 20, 50
    liongfx_Print "Thanks a lot for your time. Press a key to end."
    liongfx_Sleep
    [/code]

    info: add all in zipfile...
    (*.dll and *tbasic file)

    any feedback would be nice

    servus, nice day, Lionheart
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  7. #7
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: qt about "vertex" :)

    hi again

    ... so I need perhaps professional advice for my "vertex" idea

    what can I use for "vertex" as dimension without using open gl commands ? it's possible at all or totally rubbish ?

    dim vertex as long
    dim vertex as double ' that's perhaps... nonsense ..
    dim vertex as point ' would be better...
    I would like to go another way instead of...

    glBegin gl_Points
    glColor3f 1.0,1.0,0.0 :' yellow
    glVertex3f 0.5, 1.0, -6.0 :' 1. Point
    glVertex3f -0.5, 1.0, -6.0 :' 2. point
    glVertex3f 0.0, 2.0, -6.0 :' 3. point
    glEnd

    ...my code part idea...

    ...
    thinBasic_ParseDouble(lx.y, lx.x)
    If thinBasic_CheckComma_Mandatory = TB_TRUE Then

    Vertex (lx.x, lx.y, lx.z), lSize, lColor
    ...
    hmh, would be great to get any idea or suggestion for help.. thanks in advance

    best regards, Lionheart
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  8. #8

    Re: thinbasic Lionmodule :D

    Well, I'm not sure what you are after. Are you talking about how a new command should like or how should handle it inside FB? A vertex can have 2 or 3 dimensions. That has nothing to do with OpenGL, DirectX, GDI, what so ever. A vertex is a structure that will store the coordinates or a location, either with 2 or 3 dimensions.



    [code=freebasic]thinBasic_ParseDouble(lx.y, lx.x)
    If thinBasic_CheckComma_Mandatory = TB_TRUE Then

    Vertex (lx.x, lx.y, lx.z), lSize, lColor [/code]

    Is there a parsing function thinBasic_ParseDouble inside the FB SDK?

  9. #9
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: thinbasic Lionmodule :D

    chapter four: my "fourth dll test"

    ONE:

    uhps... !

    ...more good exercises for testing dll creation... have built this early morning a clone sister of "oxygen" module... called "LION" to learn with this great power to handle... :P I see this work it only as DLL example... don't forget

    [code=thinbasic]'-- THE HELLO PROGRAM FOR LION MODULE

    uses "lion", "console"

    lio2_basic " print `Hello Frankolino ! may be this is the rising of a new bright star at the sky ` : terminate "
    lio2_exec

    printl "hey, this is a good new for oxygen and lion module !"

    msgbox 0, "Hello, I am not alone in the darkness "[/code]

    the script works... the LION is roaring, using for living this time fully oxygen power (the children must learn to walk so I pushed it for the start!)... and if I am not standing alone in the darkness.. it will works for new functionality... I will proof it the next days...
    many thanks to charles and all his fantastic examples... without this new oxygen power module I never had have the idea to struggle for an own thinbasic module ... this oxygen module give me nearly daily motivation !

    info about my "hello-lion" example: only the message window say it's "o2", but it's "LION" made... little make-up mistake...
    I haven't yet managed it to say this script belongs to "LION" module... may be I can find it in "thincore" ???

    info: all done in zip file... a) thinbasic_lion.dll and b) "Hello Lion" script for testing...

    TWO:
    @michael... thank you, I will check it again... have some time problems at the moment because of my second job (puh) and it seems to be a FB task but didn't found any good hint about this problem... more to come... I find a way and say it to you

    Is there a parsing function thinBasic_ParseDouble inside the FB SDK?
    answer: yes !

    best regards, Lionheart

    ps: better was to name the four example above as "franzi.dll", "maria.dll" or "foo.dll" to avoid confusion, but people who like to program they are in a exciting mood and I am a little bit crazy last days with these things, you can imagine


    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  10. #10
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: thinbasic Lionmodule :D

    Hi Frank,

    no offence, but you are little bit like a squirrel - jumping from tree to tree

    Maybe we could help you better if you could present us your vision for module and its command syntax. You already presented 3 versions of lion module, each doing completely different things.

    When you need to parse 2 or 3 numbers, you can use following:
    [code=thinbasic]thinBasic_ParseXNumbers(2, 3, a, b, c)[/code]


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 1 of 8 123 ... LastLast

Similar Threads

  1. MOVED: thinbasic Lionmodule :D
    By Petr Schreiber in forum User tools
    Replies: 0
    Last Post: 01-08-2009, 10:59

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •