Running "allegro game library" within NewLisp?

Guiserver, GTK-server, OpenGL, PostScript,
Post Reply
Posts: 1
Joined: Fri Jan 08, 2021 4:21 pm

Running "allegro game library" within NewLisp?

Post by molniya345 »

Goodday to eveyone.
Could anyone please explain me and help step by step on how to bind "allegro game library" dll-s to newlisp? Here:
Well, not really "to bind" it, but just to load some functions one by one during coding progress. Which exactly dll-s and functions I have to import? Obviously the mainest one, for a beginning, at least. But... I tried to import for example "al_init" function from "alleg40.dll" but it gave me error that "al_init" function is not found. I've tried different dll-s but the error is same. I skimmed the documentation, both on liballegro and newlisp, but it didn't help much. Or maybe there is somewhere better simple library than liballegro? I need it for making simple 2d games.

Please consider this (not necessary to read, but...): I am not programmer, though I've tried once be become programmer. I have somewhat unusual head, so I can't get to other languages than Lisp. I simply cannot understand them fully (or maybe that's partly because I haven't found a great book on the subject, though I really hardly tried to find one). Also I'm very stubborn person and I have browsed really huge amount of information before I found and appreciated such a thing as Lisp. I know just a little about basic coding concepts and little experience with coding, though I don't need extra explanations of what a byte or loop is or and even what assembly language is. Actually I never used iterational style in Lisp, I always coded procedures with recursion, simply because I like this way and hardly understand the opposite. Also I like Lisp because I need(-ed) to get a simple tool, something that fits "alright" to and not-too-hard for my artistic perception, and also it must be a minimalistic tool for writing programs, a tool that helps to concentrate on ideas rather than on qeasy flow of numbers. Otherwise I could not handle programming at all.

Also, if you'll answer something, please try to avoid slang because I am not very good in engish language. Also I am not good with math... but sometimes that doesn't matter much.

I hope for heart understanding.

P.S. I am from Ukraine.

Posts: 150
Joined: Fri Oct 28, 2005 5:33 pm
Location: France

Re: Running "allegro game library" within NewLisp?

Post by newBert »

First, you need to understand how the function import works. And see some examples where it is used, like here for instance (see especially the first part with the 'import' and the 'constant'). Then after recovering all the functions from Allegro, the rest is a work of patience, a little repetitive, to create a module that can be used by programs.
Last edited by newBert on Mon Feb 01, 2021 5:38 pm, edited 1 time in total.
BertrandnewLISP v.10.7.6 64-bit on Linux (Peppermint 9)

Post Reply