Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Libraries source code
#1
Hi everyone

Is the source code from libraries .lib available ? I want simplewidget.lib so bad. BIG LOL[Image: tongue.png]
If the answer is no. Well i understand too. It's people's work.

I saw the use of simplewidget.lib in the NaaLaa tool applications. I am thinking of doing an application with a window system from scratch.
I need good start idea and then evolve.

A nice day to everyone.
Reply
#2
(06-16-2018, 01:42 PM)pedromartins Wrote: Hi everyone

Is the source code from libraries .lib available ? I want simplewidget.lib so bad. BIG LOL[Image: tongue.png]
If the answer is no. Well i understand too. It's people's work.

I saw the use of simplewidget.lib in the NaaLaa tool applications. I am thinking of doing an application with a window system from scratch.
I need good start idea and then evolve.

A nice day to everyone.

The source code of some libraries can be found in the same folder as the libraries' example files (dig under c:/N6).

Sadly the sorce code for SimpleWidget is lost. That's why I had to write a new gui library for the Linux tools (and the Linux version of NED). Some parts of this library don't work on Windows, but I'll see if if I can make it work and post the source code here.
Reply
#3
Hi Marcus

Follow your advice and dig deeply. Found this on NED 1.1.3 (windows). Sharing with everybody. [Image: biggrin.png]

AWRCollision.lib (no source)
bass.lib (no source)
BezierCurve.lib (no source)
box2d.lib (no source)
buttons.lib (no source)
gl_h.lib (no source)
gloom.lib (source at N6\Examples\Libraries\gloom)
HighScore.lib (source at N6\Examples\Libraries\HighScore)
ifx.lib (source at N6\Examples\Libraries\IFX)
ImageManipulation.lib (no source)
iup.lib (source at N6\Examples\Libraries\IUP)
Keycodes.lib (source at N6\Examples\Libraries\Keycodes)
Math.lib (source at N6\Examples\Libraries\Math)
Mode7.lib (source at N6\Examples\Libraries\Mode7)
olb.lib (no source)
OpenGl (no source)
p2p.lib (no source)
Parser.lib (source at N6\Examples\Libraries\Parser)
Password.lib (no source)
PathFinder.lib (source at N6\Examples\Libraries\PathFinder)
PolyStuff.lib (source at N6\Examples\Libraries\PolyStuff)
QuickSort.lib (source at N6\Examples\Libraries\QuickSort)
Random.lib (source at N6\Examples\Libraries\Random)
Raycaster.lib (source at N6\Examples\Libraries\Raycaster)
Scrolllist.lib (no source)
Simple3D.lib (source at N6\Examples\Libraries\Simple3D)
SimpleParticle.lib (source at N6\Examples\Libraries\SimpleParticle)
SimpleWidget.lib (no source)
Speed.lib (source at N6\Examples\Libraries\Speed)
Sprite.lib (no source)
Tilemap.lib (source at N6\Examples\Libraries\Tilemap)
Reply
#4
(06-16-2018, 05:17 PM)pedromartins Wrote: Hi Marcus

Follow your advice and dig deeply. Found this on NED 1.1.3 (windows). Sharing with everybody. [Image: biggrin.png]

AWRCollision.lib (no source)
bass.lib (no source)
BezierCurve.lib (no source)
box2d.lib (no source)
buttons.lib (no source)
gl_h.lib (no source)
gloom.lib (source at N6\Examples\Libraries\gloom)
HighScore.lib (source at N6\Examples\Libraries\HighScore)
ifx.lib (source at N6\Examples\Libraries\IFX)
ImageManipulation.lib (no source)
iup.lib (source at N6\Examples\Libraries\IUP)
Keycodes.lib (source at N6\Examples\Libraries\Keycodes)
Math.lib (source at N6\Examples\Libraries\Math)
Mode7.lib (source at N6\Examples\Libraries\Mode7)
olb.lib (no source)
OpenGl (no source)
p2p.lib (no source)
Parser.lib (source at N6\Examples\Libraries\Parser)
Password.lib (no source)
PathFinder.lib (source at N6\Examples\Libraries\PathFinder)
PolyStuff.lib (source at N6\Examples\Libraries\PolyStuff)
QuickSort.lib (source at N6\Examples\Libraries\QuickSort)
Random.lib (source at N6\Examples\Libraries\Random)
Raycaster.lib (source at N6\Examples\Libraries\Raycaster)
Scrolllist.lib (no source)
Simple3D.lib (source at N6\Examples\Libraries\Simple3D)
SimpleParticle.lib (source at N6\Examples\Libraries\SimpleParticle)
SimpleWidget.lib (no source)
Speed.lib (source at N6\Examples\Libraries\Speed)
Sprite.lib (no source)
Tilemap.lib (source at N6\Examples\Libraries\Tilemap)
Thank you for providing this information.

This may help - it is the SimpleWidget source from Naalaa 5 - it is not a lib that I have used, so I'm not sure what changes, if any, were made for NaaLaa 6 - hopefully it will help you....


Attached Files
.txt   SimpleWidget.txt (Size: 69.24 KB / Downloads: 9)
Reply
#5
Hi kcfb

Many thanks for sharing. Now i have material to work on and investigate.[Image: smile.png]
Reply
#6
I found one

 This is like hunting needles in a hay stack.
Code:
rem GL defines.
import "gl_h.lib"

visible:
    gl_dll

hidden:

function glInit(title$, x, y, w, h, hideNaaLaa)
    gl_dll = DLL_LOAD("gl_next.dll")
    if gl_dll < 0 then return false
    params?.x = x
    params.y = y
    params.w = w
    params.h = h
    params.title$ = title
    params.hide = hideNaaLaa
    DLL_CALL gl_dll, "gl_init", params
endfunc

procedure glSetFocus()
    params?
    DLL_CALL gl_dll, "gl_focus_window", params
endproc

function glRunning()
    params?
    DLL_CALL gl_dll, "gl_running", params
    return params.result;
endfunc

procedure glSet3D(fov#, zMin#, zMax#)
    params?
    params.fov# = fov
    params.zmin# = zMin
    params.zmax# = zMax
    DLL_CALL gl_dll, "gl_set_3d", params
endproc

procedure glMake2D()
    params?
    DLL_CALL gl_dll, "gl_make_2d", params
endproc

procedure glMake3D()
    params?
    DLL_CALL gl_dll, "gl_make_3d", params
endproc

function glWidth()
    params?
    DLL_CALL gl_dll, "gl_win_w", params
    return params.w
endfunc

function glHeight()
    params?
    DLL_CALL gl_dll, "gl_win_h", params
    return params.h
endfunc

procedure glRender()
    params?
    DLL_CALL gl_dll, "gl_redisplay", params
endproc

procedure glUpdate()
    params?
    DLL_CALL gl_dll, "gl_update", params
endproc

function glCreateTexture(img, smooth)
    params?.img = img
    DLL_CALL gl_dll, "create_texture", params
    if params.result
        _glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR
        _glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR
    endif
    return params.result
endfunc

procedure glDeleteTexture(tex)
    params?.texture = tex
    DLL_CALL gl_dll, "gl_delete_texture", params
endproc

procedure addv(&a#[], &b#[])
    a[0] = a[0] + b[0]
    a[1] = a[1] + b[1]
    a[2] = a[2] + b[2]
endproc

function get_addv#[](&a#[], &b#[])
    return [a[0] + b[0], a[1] + b[1], a[2] + b[2]]
endfunc

procedure subv(&a#[], &b#[])
    a[0] = a[0] - b[0]
    a[1] = a[1] - b[1]
    a[2] = a[2] - b[2]
endproc

function get_subv#[](&a#[], &b#[])
    return [a[0] - b[0], a[1] - b[1], a[2] - b[2]]
endfunc

procedure mulv(&a#[], s#)
    a[0] = a[0]*s
    a[1] = a[1]*s
    a[2] = a[2]*s
endproc

function get_mulv#[](&a#[], s#)
    return [a[0]*s, a[1]*s, a[2]*s]
endfunc

procedure divv(&a#[], s#)
    a[0] = a[0]/s
    a[1] = a[1]/s
    a[2] = a[2]/s
endproc

function get_divv#[](&a#[], s#)
    return [a[0]/s, a[1]/s, a[2]/s]
endfunc

rem Dot vector product.
function dotvp#(&a#[], &b#[])
    return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]
endfunc

rem Distance between vectors.
function distv#(&a#[], &b#[])
    dx# = b[0] - a[0]
    dy# = b[1] - a[1]
    dz# = b[2] - a[2]
    return sqr(dx*dx + dy*dy + dz*dz)
endfunc

rem Cross vector product.
function crossvp#[](&u#[], &v#[])
    return [u[1]*v[2] - u[2]*v[1], u[2]*v[0] - u[0]*v[2], u[0]*v[1] - u[1]*v[0]]
endfunc

procedure normv(&a#[])
    k# = 1.0/sqr(a[0]*a[0] + a[1]*a[1] + a[2]*a[2])
    a[0] = a[0]*k
    a[1] = a[1]*k
    a[2] = a[2]*k
endproc

function get_normv#[](&a#[])
    k# = 1.0/sqr(a[0]*a[0] + a[1]*a[1] + a[2]*a[2])
    return [a[0]*k, a[1]*k, a[2]*k]
endfunc

rem ///////////////////////////////////////////////////////////////////
rem GL command set.
rem ///////////////////////////////////////////////////////////////////

procedure glMatrixMode(mode)
    params?.mode = mode
    DLL_CALL gl_dll, "gl_matrix_mode", params
endproc

procedure glPushMatrix()
    params?
    DLL_CALL gl_dll, "gl_push_matrix", params
endproc

procedure glPopMatrix()
    params?
    DLL_CALL gl_dll, "gl_pop_matrix", params
endproc

procedure glLoadIdentity()
    params?
    DLL_CALL gl_dll, "gl_load_identity", params
endproc

procedure glTranslatef(x#, y#, z#)
    params?.x# = x
    params.y# = y
    params.z# = z
    DLL_CALL gl_dll, "gl_translate", params
endproc

procedure glScalef(x#, y#, z#)
    params?.x# = x
    params.y# = y
    params.z# = z
    DLL_CALL gl_dll, "gl_scale", params
endproc

procedure glRotatef(angle#, x#, y#, z#)
    params?.a# = angle
    params.x# = x
    params.y# = y
    params.z# = z
    DLL_CALL gl_dll, "gl_rotate", params
endproc

procedure glBegin(mode)
    params?.mode = mode
    DLL_CALL gl_dll, "gl_begin", params
endproc

procedure glEnd()
    params?
    DLL_CALL gl_dll, "gl_end", params
endproc

procedure glVertex2i(x, y)
    params?.x = x
    params.y = y
    DLL_CALL gl_dll, "gl_vertex_2i", params
endproc

procedure glVertex2f(x#, y#)
    params?.x# = x
    params.y# = y
    DLL_CALL gl_dll, "gl_vertex_2f", params
endproc

procedure glVertex3f(x#, y#, z#)
    params?.x# = x
    params.y# = y
    params.z# = z
    DLL_CALL gl_dll, "gl_vertex_3f", params
endproc

procedure glNormal3f(x#, y#, z#)
    params?.x# = x
    params.y# = y
    params.z# = z
    DLL_CALL gl_dll, "gl_normal", params
endproc

procedure glTexCoord2f(u#, v#)
    params?.u# = u
    params.v# = v
    DLL_CALL gl_dll, "gl_tex_coord", params
endproc

procedure glBindTexture(target, tex)
    params?.t = target
    params.id = tex
    DLL_CALL gl_dll, "gl_bind_texture", params
endproc

function glGenLists(range)
    params?.range = range
    DLL_CALL gl_dll, "gl_gen_lists", params
    return params.result
endfunc

procedure glNewList(list, mode)
    params?.list = list
    params.mode = mode
    DLL_CALL gl_dll, "gl_new_list", params
endproc

procedure glEndList()
    params?
    DLL_CALL gl_dll, "gl_end_list", params
endproc

procedure glDeleteLists(list, range)
    params?.list = list
    params?.range = range
    DLL_CALL gl_dll, "gl_delete_list", params
endproc

procedure glCallList(list)
    params?.id =  list
    DLL_CALL gl_dll, "gl_call_list", params
endproc

procedure glClearColor(red#, green#, blue#, alpha#)
    params?.r# = red
    params.g# = green
    params.b# = blue
    params.a# = alpha
    DLL_CALL gl_dll, "gl_clear_color", params
endproc

procedure glColor4ub(red, green, blue, alpha)
    params?.r = red
    params.g = green
    params.b = blue
    params.a = alpha
    DLL_CALL gl_dll, "gl_color_4ub", params
endproc

procedure glEnable(cap)
    params?.cap = cap
    DLL_CALL gl_dll, "gl_enable", params
endproc

procedure glDisable(cap)
    params?.cap = cap
    DLL_CALL gl_dll, "gl_disable", params
endproc

procedure glClear(mask)
    params?.mask = mask
    DLL_CALL gl_dll, "gl_clear", params
endproc

procedure glColor3ub(red, green, blue)
    params?.r = red
    params.g = green
    params.b = blue
    DLL_CALL gl_dll, "gl_color_3ub", params
endproc

procedure glColor3f(red#, green#, blue#)
    params?.r# = red
    params.g# = green
    params.b# = blue
    DLL_CALL gl_dll, "gl_color_3f", params
endproc

procedure glColor4f(red#, green#, blue#, alpha#)
    params?.r# = red
    params.g# = green
    params.b# = blue
    DLL_CALL gl_dll, "gl_color_4f", params
endproc

procedure glFogi(pname, param)
    params?.pn = pname
    params.p = param
    DLL_CALL gl_dll, "gl_fog_i", params
endproc

procedure glFogf(pname, param#)
    params?.pn = pname
    params.p# = param#
    DLL_CALL gl_dll, "gl_fog_f", params
endproc

procedure glFogfv(pname, params#[])
    p?.pn = pname
    p.r# = params[0]
    p.g# = params[1]
    p.b# = params[2]
    p.a# = params[3]
    DLL_CALL gl_dll, "gl_fog_fv", p
endproc

procedure glTexParameterf(target, pname, param#)
    params?.t = target
    params.pn = pname
    params.p# = param
    DLL_CALL gl_dll, "gl_tex_parameter_f", params
endproc

procedure glTexParameteri(target, pname, param)
    params?.t = target
    params.pn = pname
    params.p = param
    DLL_CALL gl_dll, "gl_tex_parameter_i", params
endproc

procedure glDepthMask(flag)
    params?.f = flag
    DLL_CALL gl_dll, "gl_depth_mask", params
endproc

procedure glScissor(x, y, w, h)
    params?.x = x
    params.y = y
    params.w = w
    params.h = h
    DLL_CALL gl_dll, "gl_scissor", params
endproc

procedure glBlendFunc(sfactor, dfactor)
    params?.s = sfactor
    params.d = dfactor
    DLL_CALL gl_dll, "gl_blend_func", params
endproc

procedure glPointSize(size#)
    params?.s# = size
    DLL_CALL gl_dll, "gl_point_size", params
endproc

function glNewModel(numFrames, numTriangles, numVertices, numTextureCoords)
    params?
    params.nf = numFrames
    params.nt = numTriangles
    params.nv = numVertices
    params.ntc = numTextureCoords
    DLL_CALL gl_dll, "new_mdl", params
    return params.result
endfunc

procedure glSetModelTriangle(model, index, v0, v1, v2, tc0, tc1, tc2)
    params?
    params.m = model
    params.i = index
    params.v0 = v0
    params.v1 = v1
    params.v2 = v2
    params.tc0 = tc0
    params.tc1 = tc1
    params.tc2 = tc2
    DLL_CALL gl_dll, "set_mdl_tri", params
endproc

procedure glSetModelTexCoord(model, index, s#, t#)
    params?
    params.m = model
    params.i = index
    params.s# = s
    params.t# = t
    DLL_CALL gl_dll, "set_mdl_tc", params
endproc

procedure glSetModelVertex(model, frame, index, x#, y#, z#)
    params?
    params.m = model
    params.f = frame
    params.i = index
    params.x# = x
    params.y# = y
    params.z# = z
    rem wln x, " ", y, " ", z
    DLL_CALL gl_dll, "set_mdl_vrt", params
endproc

procedure glDeleteModel(model)
    params?.m = model
    DLL_CALL gl_dll, "del_mdl", params
endproc

procedure glRenderModel(model, frame1, frame2, param#)
    params?.m = model
    params.f0 = frame1
    params.f1 = frame2
    params.p# = param
    DLL_CALL gl_dll, "drw_model", params
endproc


Attached Files
.zip   td_example2.zip (Size: 807.16 KB / Downloads: 3)
.zip   p2p_beta2.zip (Size: 802.03 KB / Downloads: 2)
Reply
#7
[Image: attachment.php?aid=55]

Here's    some more files that could be useful.

 I have them scattered in several places. Too many to send all at once.


.bmp   Sample.bmp (Size: 172.77 KB / Downloads: 73)
Reply
#8
Hi rick

Just make a big zip file. Just kiding. [Image: smile.png]
Just publish one at a time when you have the time of coarse. [Image: smile.png]
Reply
#9
(06-17-2018, 01:51 PM)kcfb Wrote:
(06-16-2018, 05:17 PM)pedromartins Wrote: Hi Marcus

Follow your advice and dig deeply. Found this on NED 1.1.3 (windows). Sharing with everybody. [Image: biggrin.png]

AWRCollision.lib (no source)
bass.lib (no source)
BezierCurve.lib (no source)
box2d.lib (no source)
buttons.lib (no source)
gl_h.lib (no source)
gloom.lib (source at N6\Examples\Libraries\gloom)
HighScore.lib (source at N6\Examples\Libraries\HighScore)
ifx.lib (source at N6\Examples\Libraries\IFX)
ImageManipulation.lib (no source)
iup.lib (source at N6\Examples\Libraries\IUP)
Keycodes.lib (source at N6\Examples\Libraries\Keycodes)
Math.lib (source at N6\Examples\Libraries\Math)
Mode7.lib (source at N6\Examples\Libraries\Mode7)
olb.lib (no source)
OpenGl (no source)
p2p.lib (no source)
Parser.lib (source at N6\Examples\Libraries\Parser)
Password.lib (no source)
PathFinder.lib (source at N6\Examples\Libraries\PathFinder)
PolyStuff.lib (source at N6\Examples\Libraries\PolyStuff)
QuickSort.lib (source at N6\Examples\Libraries\QuickSort)
Random.lib (source at N6\Examples\Libraries\Random)
Raycaster.lib (source at N6\Examples\Libraries\Raycaster)
Scrolllist.lib (no source)
Simple3D.lib (source at N6\Examples\Libraries\Simple3D)
SimpleParticle.lib (source at N6\Examples\Libraries\SimpleParticle)
SimpleWidget.lib (no source)
Speed.lib (source at N6\Examples\Libraries\Speed)
Sprite.lib (no source)
Tilemap.lib (source at N6\Examples\Libraries\Tilemap)
Thank you for providing this information.

This may help - it is the SimpleWidget source from Naalaa 5 - it is not a lib that I have used, so I'm not sure what changes, if any, were made for NaaLaa 6 - hopefully it will help you....


Ah darned, you had the source code for SimpleWidget? If I had known, I would never have rewritten the tilemap and raycaster editors for Linux, haha Smile I remember e-mailing some guys to check if they had the source code, but none of them had it. Yeah, my Windows computer crashed pretty hard and I lost lots of stuff. But to be frank, I like the Linux tools better Smile
Reply
#10
Hi everyone

This took me 2 days of work. Line by line. Found some "bugs" or not when formatting document. Put some in red.
This is first stage of my window system investigation. First you format the "alien" code then you try to understand it. LOL [Image: smile.png]

Sharing this with everybody [Image: smile.png]


.pdf   simplewidget.pdf (Size: 1.25 MB / Downloads: 13)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)